How does BaseAdapter communicate with its ListView?

I was wondering how the BaseAdapter. notifyDataSetChanged() method
notifies the attached View that the underlying data has been changed
and it should refresh itself?

When creating a BaseAdapter you attach it to the View with
ListView.setAdapter(adapter). So not the ListView then knows where to
get list elements.

But you never tell the BaseAdapter what ListView it is attached to. So
when you call BaseAdapter.notifyDataSetChanged() how does it reach the
View to tell it to refresh itself?

I ask because I am making a call to BaseAdapter.notifyDataSetChanged()
in an AsyncTask.onPostExecute method and it never returns, system just
seems to hang…

Thank you!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to