I use SimpleAdapter with custom row layout for Listview
SimpleAdapter adapter = new SimpleAdapter(ListOrder.this, oslist,
R.layout.list_v,
new String[] { "name","time","status" },
new int[] { R.id.tablename, R.id.timeorder, R.id.status});
list.setAdapter(adapter);
After , i reload data of Listview and i want remove old data. I don't know how i can't remove old data before add new data to Listview.
I used
adapter.remove(adapter.getItem(i));
but have error
The method remove(Object) is undefined for the type SimpleAdapter
Please help me ! Thank you!
You can simply set
listview.setAdapter(null);