[英]RecyclerView with swipe gesture actions
I'm a new Android developer and I would like to use swipe actions on a RecyclerView Items like the video below I found on material.io (please see link below) 我是一名新的Android开发人员,我想在RecyclerView项目上使用滑动操作,例如我在material.io上找到的以下视频(请参见下面的链接)
I found a lot of libraries but often swipe gesture is for remove items or reveal buttons. 我发现了很多资料库,但经常滑动手势是为了删除项目或显示按钮。 It's not what I want.
这不是我想要的。 Could you please help me to create the same behaviour as shown in this below example ("elastic" effect, swipe left or right, background color animation with icon update) ?
您能否帮我创建以下示例中所示的行为(“弹性”效果,向左或向右滑动,带有图标更新的背景色动画)?
Maybe a library already exists?? 也许图书馆已经存在了?
Thanks for your help 谢谢你的帮助
https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1gSz-L39Or4aM8GhQn0ZhnUkaV5E-cyoc%2Ftype-action-swipe.mp4 https://storage.googleapis.com/spec-host-backup/mio-design%2Fassets%2F1gSz-L39Or4aM8GhQn0ZhnUkaV5E-cyoc%2Ftype-action-swipe.mp4
you should use this ItemTouchHelper 您应该使用此ItemTouchHelper
this gives swipe functionalty for recyclerView items 这为recyclerView项目提供了滑动功能
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.