3

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 the next viewpager view.

Tapeshvar
  • 338
  • 1
  • 13
Tejas
  • 898
  • 2
  • 15
  • 38
  • you can see [here](http://stackoverflow.com/questions/15382753/design-a-horizontalscrollview-inside-of-viewpager-or-use-fragments) maybe ,it can help you – Fooyou Apr 01 '14 at 09:40

1 Answers1

9

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);
        }
Fooyou
  • 91
  • 1
  • 1
    This helped me - after around 3h of looking for a solution to having a HorizontalScrollView (containing an ImageView with a very big image) inside a ViewPager. Thank you :) – JakeP May 23 '14 at 11:05