The situation:
I have an activity with a spinner and a list with a BaseAdapter.
The list is loaded once, and shows correctly… But when I click on the spinner to change the underlying data and call adapter.notifyDataSetChanged(); the list doesn’t refresh.
By this I mean that the data is changed and the adapter has the right data, it’s just that the listView doesn’t change the view.
How to force the listViews to show the right data?
Tryadapter.notifyDataSetInvalidated();as well asadapter.notifyDataSetChanged();EDIT:
Clear your ArrayList or whatever you’re using before you add more items with something like
.clear();and then add the new items and calladapter.notifyDataSetChanged();