Code example for ViewPager

Methods: canScroll

0
        if(android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH  
                && arg0 instanceof TouchImageView) { 
            TouchImageView view = (TouchImageView) arg0; 
            return view.canScrollHorizontally(-arg2); 
        } else { 
            return super.canScroll(arg0, arg1, arg2, arg3, arg4); 
        } 
    } 
 
    public MyViewPager(Context context, AttributeSet attrs) { 
        super(context, attrs); 
    } 
 
} 
Contextual code suggestions in your IDE  Get Codota for Java