Hi,
I have an ArrayAdapter which is used to show a list in a ListActivity.
This list is updated from time to time and when this happens I call
notifyDataSetChanged() on the ArrayAdapter.
This works well as the Activity shows the changes (eg. adding a new
item to the list).
However, when I select/click on an item, the wrong Object is being
selected:
onListItemClick(ListView l, View v, int position, long id) {
The position is correct, but:
getListView().getItemAtPosition(position);
yields the object which was in the position of the previous list.
I'm wondering how can I update the ListView when I
notifyDataSetChanged() so that an update ListView is referred to in:
getListView().getItemAtPosition(position);
Thank you for any help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en