I'm trying to use in my
notifyDataSetChanged only works if you use the
clear() on the Adapter.
ArrayAdapter is constructed, it holds the reference for the
List that was passed in. If you were to pass in a
List that was a member of an Activity, and change that Activity member later, the
ArrayAdapter is still holding a reference to the original
List. The Adapter does not know you changed the
List in the Activity.
Your choices are:
ArrayAdapterto modify the underlying List (
ArrayAdapterwith the new
Listdata. (Uses a lot of resources and garbage collection.)
ListAdapterthat allows changing of the underlying
notifyDataSetChanged()every time the list is updated. To call it on the UI-Thread, use the