Android的ListView的刷卡像Twitter的列表行动 [英] Android ListView Swipe for Action like Twitter List
问题描述
我试图实施刷卡行动的功能 - 就像你可以在新Twitter的应用程序看到。仔细描述你会发现在刷卡的行动说明。
I'm trying to implement the "swipe for action" feature - like you can see in the "new" twitter app. A closer description you find at swipe for action description.
现在,有什么想法/解决方案如何实现这个功能?
Now, are there any ideas/solution how to implement this feature?
谢谢!
推荐答案
每一行中使用 GestureDetector
,并包裹在一个 ViewFlipper
。在刷卡,切换儿童 ViewFlipper
。
Use a GestureDetector
in each row, and wrap the row contents itself in a ViewFlipper
. On a swipe, switch children of the ViewFlipper
.
我有一个 ViewSwiper
,结合了 GestureDetector
和 ViewFlipper
,但它的目的是在任一方向(如工作,从常规行,刷卡离开的或的权利将切换至动作),其可以是或可以不是理想的。但是,它应该给你这是如何工作的想法。
I have a ViewSwiper
that combines a GestureDetector
and ViewFlipper
, but it is designed to work in either direction (e.g., from the regular row, a swipe left or right would switch to the actions), which may or may not be desirable. But, it should give you an idea of how this might work.
这篇关于Android的ListView的刷卡像Twitter的列表行动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!