bauerca / drag-sort-listview

Android ListView with drag and drop reordering.
3.2k stars 1.44k forks source link

Rowview background does not represent state #82

Closed gabrielittner closed 11 years ago

gabrielittner commented 11 years ago

I have a state-list drawable as background for my rowviews. When I call setCheckedItem the background of the rowview should change to the one defined in the state-list. This doesn't happen when I use the DragSortListView. When I just change the xml back to ListView it works fine, so I don't think it's an issue on my side.

gabrielittner commented 11 years ago

I have to specify the problem a little further. The checked state works fine, but on API11+ the default ListView calls setActivated() on the rowview if it isn't checkable. This is the thing that doesn't happen when using the DragSortListView.

bauerca commented 11 years ago

Okay, so the problem is that DragSortItemView (which wraps all DSLV list items) is always an instance of Checkable, which means that setActivated() will never get called by ListView. Argh.

Working on the fix; stay tuned...

bauerca commented 11 years ago

Please test! Thanks. -Carl

gabrielittner commented 11 years ago

It works. Thanks a lot :)

homj commented 11 years ago

It's not working for me... I'm on API 16