bauerca/drag-sort-listview — pull request #53 by mattiasflodin (2012-11-25 10:30:31+00:00)
Title: Support for Checkable list items

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).