dvdciri/MultiChoiceRecyclerView

Keep the state of the toolbar unchanged

Closed this issue · 5 comments

If you set a toolbar icon (home as up icon) on the original toolbar and you set the MultiChoiceToolbar, whenever the deselectAll action is made and the old toolbar is restored it'll remove the icon not keeping the state of the toolbar unchanged.

A workaround for now is to set the MultiChoiceSelectionListener and at OnDeselectAll() reset the icon again.

I'm starting working on this in the 1.1.8 along with some consistent improvement on the MultiChoiceToolbar.

Seems to be resolved in the 1.1.7 release. Updated today and behaving how I was expecting it to!

It shouldn't be resolved, the only way is to restore to icon in the onDeselectAll

Anyway, in the 1.1.8 release there will be a Builder for the MultiChoiceToolbar so you can pass you toolbar icon in and will be restore when needed.

Update: PR #13 available to be merged into prod, will release it soon

Available in 1.1.8:
Use this method to set the icon and action for the MultiChoiceToolbarBuilder
Builder setIcon(int icon, View.OnClickListener action)