I created a customized ListView with an image and two TextViews. At the moment, when the list is called more than once, the data is appended to the end of the list.
Is there a way to clear the listview so that the new data is again at the top of the listView?
You probably want to issue a
.clear()on your adapter.Note that this depends on the Adapter you use, you may not be able to do this. SimpleAdapter is used for static data, thus it can’t be updated after creation.
PS. not all Adapters have a clear() method. ArrayAdapter does, but ListAdapter or SimpleAdapter don’t