Possible Duplicate:
how to clear my listview in android
In android, i have used a listadapter, simple adapter and passed an array and i want to clear the listview contents? Instead of clearing , it is appending the records to my listview.
Grab my Custom adapter from here. TestAdapter
Now add a method like this..
public void clearAdapter()
{
deviceNames.clear();
selected.clear();
notifyDataSetChanged();
}
Now call youListAdapter.clearAdapter()
from you Activity.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With