android ViewPager 与 ImageView 子视图 - 触摸事件不会传递给子视图
我有带有RelativeLayout 子视图的ViewPager 视图。子视图包含 ImageView 和 TextView。问题是,如果我将 setOnTouchListener 设置为 ImageView,则触摸 ImageView 时不会调用该事件。我认为问题与 ViewPager 拦截触摸事件并且不将其进一步传递给子视图这一事实有关。有没有办法控制ViewPager是否可以将触摸事件传递给子视图?
I have ViewPager view with RelativeLayout child views. The child view contains an ImageView and TextView. The problem is that event if I set setOnTouchListener to ImageView, it is not called when touching the ImageView. I think the problem is related to the fact that ViewPager intercepts touch events and does not pass it further to child views. Is there a way to control whether ViewPager can pass touch events to child views?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论