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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答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);
}