遮罩触摸手势 - android
好吧,让我们做个基础,我有三个页面
(viewgroups
),我可以像主屏幕一样滚动浏览它们。其中一个页面
是一个画廊。现在的问题是在图库上进行任何滑动都会将页面
更改为。是否可以将 trouch 手势限制在视图组的某个部分?
任何帮助表示赞赏。谢谢!
OK lets make this basic, I have three pages
(viewgroups
) which I can scroll through like the home screen. On one of the pages
is a gallery. Now the problem is any swipes on the gallery case the pages
to change to. Is it possible to restrict trouch gestures to a certain part of the viewgroup?
Any help appreciated. Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,只是我在表格布局中有按钮。重写视图组的dispatchTouchEvent()可以轻松地在页面之间切换。问题是该按钮不再收到点击。
I had the same problem, only that I had buttons in a table layout. Overriding the viewgroup's dispatchTouchEvent() made it easy to switch between pages. The problem is that the button's do not receive clicks anymore.