views:

437

answers:

2

Hi,

I have a ListView and I want to select multiple items in the ListView without using CheckedTextView.

Please help !!

A: 

I never tried it, but I would use ListView with checkbox but non visible. Perform the setChecked(True) when the user press on an item. I would also try changing the item background when the checkbox is checked.

Macarse
i don't think you need a hidden checkbox view. Just use a boolean.
Segfault
@Segfault: Yep, that will work too
Macarse
+1  A: 

You don't really need a CheckBox. All you need is a boolean flag on your list objects. When the user clicks an item you change the state of the flag, and probably the background or text color for that list item.

Stefan Cosma
I already tried this before posting this question, but its not working i.e background and text color are not changing. could you help me?
Kaillash