Apologies for not entering in the subject...

On Mar 18, 10:47 am, julius <jul...@msa.co.nz> wrote:
> 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 android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to