Hi,
I have a multi-select ListActivity, and I'd like to programmatically
detect which of the items are selected. I tried implementing
OnListItemClick(), and doing this:
if(v instanceof CheckedTextView)
{
boolean selected = ((CheckedTextView)v).isChecked();
if(selected)
{
// item is checked
}
}
The problem is, "checked" above is always the opposite of the state of
the item. E.g. if I select an item in the list (thereby checking it),
the isChecked() method returns false. The next time I click, the
isChecked() method for the CheckedTextView returns true. So I'm
essentially getting the click event before the state of the item
changes.
I'm sure I'm doing this wrong, so I'd appreciate any insights.
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---