Android 通过加速移动项目
我似乎找不到这个问题的答案,主要是因为我不知道它叫什么。
我将在我的应用程序中扩展一些功能,目前用户可以触摸并拖动以在图像列表中向前移动。我想要的是用户“滑动”手指,然后所有这些图像将在加速下移动并慢慢停止。
这是一个手势吗?如果是的话,是“Fling”手势吗?
I cant seem to find the answer to this, mainly because I don't know what it is called.
I am going to expand a few features in my app, currently users can touch and drag to move forward in a list of images. What I want is for the users to "swipe" there finger and then all of these images will move under acceleration and will slowly come to a stop.
Is this a gesture? If so is it the "Fling" gesture?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有几种方法可以做到这一点。
ListView
Gallery
ScrollView
HorizontalScrollView
ViewGroup
或View
对于最后一种方法,您必须按照您所说的方式检测 Fling 手势并处理所有涉及的滚动动画。
There are several ways to do so.
ListView
Gallery
ScrollView
HorizontalScrollView
ViewGroup
orView
For the last approach, you have to detect the Fling gesture as you said and handle all the scrolling animations involved.