Reputation: 7597
I have a source of data that changes from time to time. When it does I simply do:
mylistView.setAdapter(...)
which works fine and replaces the old data with the new ones. Thing is, I dunno if it is the right way to go. Is there any way to notify the view about the change in the data layer? Bear in mind I am not using a content provider and the data layer is completely hand-madeso dont make any assumption about the data layer as it is simply a List of beans.
cheers
Upvotes: 1
Views: 1849
Reputation: 9902
I'm not sure what kind of adapter you are using, but you might see if you have adapter.notifyDataSetChanged(); on your list adapter. This will keep it from jumping around on the user when it re-binds your content.
Upvotes: 4