Skip to content
This repository has been archived by the owner on Oct 23, 2021. It is now read-only.

Support per-item selectability #22

Open
ened opened this issue Mar 28, 2016 · 5 comments
Open

Support per-item selectability #22

ened opened this issue Mar 28, 2016 · 5 comments

Comments

@ened
Copy link

ened commented Mar 28, 2016

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.

@jingibus
Copy link

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
#22

@ened
Copy link
Author

ened commented Mar 28, 2016

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.

@jingibus
Copy link

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.

@ened
Copy link
Author

ened commented Mar 28, 2016

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.

@jingibus
Copy link

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
#22 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants