如何在手指像线性布局一样在其父容器上滑动时聚焦子项目?
我有一个 LinearLayout,其中垂直包含一些 TextView。我已经使所有 TextView 都可聚焦。
我想要做的是,当用户在 LinearLayout 上从上到下使用手指滑动时,焦点会相应改变,焦点应该随着手指的移动而改变。
我该怎么做?
I have a LinearLayout which contains some TextView vertically. I have made all TextView focusable.
What I want to do is that when user use finger slip on the LinearLayout from top to Bottom, the focus would change accordingly, the focus should change along with finger movement.
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当用户的手指在屏幕上时没有焦点。请参阅http://android-developers.blogspot.com/2008/12/触摸模式.html
There is no focus when the user's finger is on screen. See http://android-developers.blogspot.com/2008/12/touch-mode.html