Code example for ViewPager

Methods: getAdaptergetCurrentItemonTouchEvent

0
        } 
    } 
 
    @Override 
    public boolean onTouchEvent(MotionEvent ev) {
        return canSlide() && super.onTouchEvent(ev);
    } 
 
    private boolean canSlide() { 
        final ValidationViewPagerAdapter adapter = (ValidationViewPagerAdapter) getAdapter();
        return adapter.isFragmentValid(getCurrentItem());
    } 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE