SimpleOnGestureListener 不适用于 ScrollView
我有一个屏幕,其中有页眉、ScrollView 内的 TextView 和页脚。我必须使用 ScrollView,因为 TextView 中的文本也可能很长。
现在,当我在此屏幕上使用 SimpleOnGestureListener 时。它不适用于 ScrollView 部分。删除 ScrollView 一切正常。但对于长文本的情况,有些文本会被遗漏。
我想在 SimpleOnGestureListener 中使用 onFling 和 onDoubleTap 。
请指教。
问候, 香卡
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我得到了这个问题的解决方案
在您的 Activity 类中添加以下方法
正如以下链接中所建议的:
http://groups.google.com/group/android-developers/browse_thread/thread/9fdfb03d0959e299
I got the solution for this issu
Add following method in the your Activity class
As suggested in the below link:
http://groups.google.com/group/android-developers/browse_thread/thread/9fdfb03d0959e299
您必须创建一个自定义 ScrollView 对象并覆盖它的 onTouchEvents 来检查您的手势。下面的代码对此进行了演示。
如果您遇到任何问题,请告诉我。 :)
-扎伊德
You have to create a custom ScrollView object and override it's onTouchEvents to also check for your gestures. It's demonstrated in the following code.
Let me know if you run into any issues. :)
-Zaid