You can call adapter.notifyDataSetChanged()
to just refresh the list.
The getView()
adapter is called at different times and there is no specific template. Therefore, your views are updated every time the ListView
wants it to be updated.
But as far as I can see, you are looking for adapter.notifyDataSetChanged
. The workflow should be something like this.
Set adapter to ListView Add data to adapter` Call notifyDataSetChanged() on adapter.
It will at least prevent your list from returning to the first item in the list. Hope this helps.
source share