The tab activity queries the database and binds the result to the list view.
The problems is when i clicked on the delete button, it works but the list view did not refresh.
the things i’ve tried:
adapter.notifyDataSetChanged();
adapter.notifyDataSetInvalidated();
listview.invalidateViews();
listview.setAdapter(adapter);
so far none is working, i have to click another tab (tab1) then click back (tab2) to refresh it.
Any ideas?
Note sure about the way you are using to delete. I think you are manipulating ListView directly. You have to use
remove()method of adapter. In fact you have to manipulate the contents of the list through the adapter.