Open ened opened 8 years ago
This behavior is supported right now by using a different MultiSelector for each selection set you want to configure.
On Mon, Mar 28, 2016 at 3:34 AM, Sebastian Roth notifications@github.com wrote:
Right now, only all or none items can be set as selectable.
The MultiSelector should not use it's own "mIsSelectable" flag, but the SwappingHolder#isSelectable to decide what happens on a click.
— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/bignerdranch/recyclerview-multiselect/issues/22
Perhaps not. I'm looking for that behavior within a set.
Example: File browser lists files in a folder, and only the writable files can be marked for deletion.
That can be accomplished by having a different ViewHolder type for writable files. Writable files are hooked up to the "deletion" MultiSelector, and non-writeable files aren't hooked up to it at all.
Staying at the file manager example:
Ok but what if the same set SHOULD be selectable if the users wants to select for something beside deletion (like sharing).
I would probably refresh all items then and reload with new item types but that doesn't seem as efficient. Plus the viewHolder interface does provide a "isSelectable" method which does not seem used in the Selector.
Then share would have a separate MultiSelector. On Mar 28, 2016 11:17 AM, "Sebastian Roth" notifications@github.com wrote:
Staying at the file manager example:
Ok but what if the same set SHOULD be selectable if the users wants to select for something beside deletion (like sharing).
I would probably refresh all items then and reload with new item types but that doesn't seem as efficient. Plus the viewHolder interface does provide a "isSelectable" method which does not seem used in the Selector.
— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/bignerdranch/recyclerview-multiselect/issues/22#issuecomment-202434185
Right now, only all or none items can be set as selectable.
The MultiSelector should not use it's own "mIsSelectable" flag, but the
SwappingHolder#isSelectable
to decide what happens on a click.