Skip to content Skip to sidebar Skip to footer

Can I Use Horizontal Scrollview Inside A Viewpager In Android?

Is it possible to make a horizontal scrollview inside viewpager in android ? The HorizontalScrollView should scroll until it reaches its edges, then on next scrolling, should load

Solution 1:

your can just make custom xxViewpager extends Viewpager, and Override the canScroll method like below:

 @Override
        protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) {
                if (v instanceof HorizontalScrollView) {
                        return true;
                }
                return super.canScroll(v, checkV, dx, x, y);
        }

Post a Comment for "Can I Use Horizontal Scrollview Inside A Viewpager In Android?"