本文介绍了如何在RecyclerView中使用拖动手势进行多选?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个非常简短的问题:最近,Google更新了其材料设计指南,显示了多项选择应该类似于Google-Photos应用程序( 此处 ),例如:

This is a very short question:Recently Google has updated its material design guidelines, showing that multi selection of items should be like on the Google-Photos app (here), as such:

我注意到,即使您已经处于多选模式下,您仍然可以在任意位置使用此手势.

I've noticed that even if you are already in multi-selection mode, you can still use this gesture anywhere you wish.

到目前为止,我所做的是处理项目的点击以进行多选,但是我该如何处理Google展示的内容?

What I did so far is handling clicking of items for multi-selecting them, but how do I do what Google has shown?

推荐答案

似乎比我想象的要复杂,但是为此提供了一个库:

Seems it's more complicated than I thought, but there is a library for this:

https://android-arsenal.com/details/1/5152

https://github.com/MFlisar/DragSelectRecyclerView

基于:

https://github.com/weidongjian/AndroidDragSelect-SimulateGooglePhoto

这篇关于如何在RecyclerView中使用拖动手势进行多选?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 06:59
查看更多