[英]Can I use Horizontal Scrollview Inside a Viewpager in Android?
Is it possible to make a horizontal scrollview
inside viewpager in android ? 是否有可能在android中的viewpager中进行水平
scrollview
?
The HorizontalScrollView
should scroll until it reaches its edges, then on next scrolling, should load the next viewpager view. HorizontalScrollView
应该滚动直到到达其边缘,然后在下一次滚动时应加载下一个viewpager视图。
your can just make custom xxViewpager extends Viewpager, and Override the canScroll method like below: 您可以只使自定义xxViewpager扩展Viewpager,并重写canScroll方法,如下所示:
@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);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.