tags:

views:

26

answers:

2

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

+1  A: 

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.

sadboy
yes that will do! I use an ArrayAdapter so it should work fine. Thanks
nourdine
A: 

Check this link

fedj