从屏幕底部的刷卡/拖动的Android观点 [英] Swipe/drag Android view from the bottom of the screen
问题描述
嘿,我想在我的应用程序视图,我可以从窗口底部刷(图像以下更好地解释它)。我希望以停在某一点。视图必须允许刷卡/再次将其拖动到下方。我怎么能做到这一点的任何想法或提示?先感谢您。
Hey I want to do in my app a View that I can swipe from the bottom of the window (Images below explain it better). I want the view to stop at certain point. The view must allow to swipe/drag it to the bottom again. Any idea or tip of how can I do that? Thank you in advance.
推荐答案
我觉得你是在寻找一个 ViewDragHelper
:
I think you are in search of a ViewDragHelper
:
API文档: 的https://developer.android.com/reference/android/support/v4/widget/ViewDragHelper.html
如何使用。这个答案链接到一个示例项目向您展示如何,以及: ViewDragHelper:?如何使用它
How to use. This answer links to a sample project to show you how as well: ViewDragHelper: how to use it?
拖动最佳实践:
http://developer.android.com/training/gestures/scale.html
这篇关于从屏幕底部的刷卡/拖动的Android观点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!