1.include a radio button that shows the
selected state in the recyclerview item when clicked
2.In the adapter have an list of your choosing (eg. ArrayList)
that contains your selected objects (add/remove them when selected/deselected)
3.In the adapter you can make a method (eg. getSelectedItems()) that will
return that list.
1条答案
按热度按时间zbdgwd5y1#
我认为没有多选监听器,因为RecylerView就是这样设计的,它回收不再可见的布局项,并在需要时重新创建它们。
作为解决方法,您可以执行以下操作:
如果你提供什么你尝试到目前为止,我会帮助你的代码