Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When ListView has a choiceMode other than none, it can graphically display which item(s) are currently selected, if (and only if) the list items implement the Checkable interface. With DSLV, even if list items implement this interface, it is hidden by the list-item wrapper used (DragSortItemView). With this change, DragSortItemView implements the Checkable interface and forwards it to the wrapped item view if it implements Checkable, allowing DSLV to function properly in all choice modes. I considered a different design where we have a CheckableDragSortItemView that inherits from DragSortItemView. DSLV would then instantiate different variants depending on what is needed. However, the only reason I could find for doing this would be to avoid the few cycles spent on instanceof checks, and the original ListView code does not seem to have any concerns about doing this (see ListView.setupChild).
- Loading branch information