Questions about ListView

klaus

Expert
Licensed User
Longtime User
I have played a bit with the ListView view and the Reflection library.
The 'default' ListView doesn't have any selected item.
But ListView has 3 different CHOICE_MODEs
CHOICE_MODE_NONE (0) default
CHOICE_MODE_SINGLE (1) 1 checked item only
CHOICE_MODE_MULTI (2) multiple checked items allowed.

All 3 modes work well.

The problems I have are:
- is it possible to have a different color for the checked items ?
I did some trials without success.

- how to get the list of checked items in multi mode.
getCheckedItemPosition works well in single mode
getCheckedItemPositions with a SparseBooleanArray, I didn't get it to work
isItemChecked works well.

- addHeaderView seems not working either (at least I didn't get it to work).

Attached my test program.

Best regards.
 

Attachments

  • ListView.zip
    7.9 KB · Views: 310
Top