Right slide controls overview

RightScrollView right sliding control is to monitor the user right hand gestures, perform gestures with animation, and at the end of the right to provide an interface of the control.Developers can define their own functions in the right sliding interface.Generally applied in the right slide out/up.This control is a container, there is no actual content, so use need to add content to the control.

The right sliding control is introduced

To control the content

You need to add a view to RightScrollView content:

Parameters: the resource ID of the general layout file.
Parameters: the View.
setContentView(View, LayoutParams)
Parameters: the View, any View;LayoutParams, layout parameters, is used to control the view in the layout of the RightScrollView.

Open/close the right to monitor

You can open/close right at a particular time listening in operation, need to achieve the interaction effects:

Open the right operation monitoring, will intercept the right operation.
Close the right to monitor, intercept will no longer slide operation right and handled by system or user processing on its own.

Right listener

Right after the slide, slide controls if right is set to the listener, calls the listener callback method, execute right given by the user logic.

Right listener。

Listening to the right event

To listen right slide events you need OnRightScrollListener callback method in the listener: onRightScroll ().Controls can slip on the right after the callback, this method performs logic given by the user.

Right exit application is a typical usage:

public class RightScrollActivity extends Activity implements
        OnRightScrollListener {
    private RightScrollView mView;

    protected void onCreate(Bundle savedInstanceState) {
        mView = new RightScrollView(this);

    public void setContentView(int layoutResID) {

    public void setContentView(View view) {

    public void setContentView(View view, LayoutParams params) {
        mView.setContentView(view, params);

    public void onRightScroll() {

In the example above didn't close right operation requirements, in actual use, may need to close right slide to avoid conflict events or to achieve a more flexible interaction.