Code example for ViewPager

Methods: getContext

0
    private float mCurrY = 0.0f;
    private float mStartX, mStartY;
    private int mTouchSlop;
 
    public BeastViewPager(Context context) {
        super(context);
        init(); 
    } 
 
    public BeastViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(); 
    } 
 
    private void init() { 
        ViewConfiguration viewConfiguration = ViewConfiguration.get(getContext());
        mTouchSlop = (viewConfiguration.getScaledTouchSlop());
    } 
 
    @Override 
    public boolean onInterceptTouchEvent(MotionEvent event) {