Reputation: 64844
I have tabs activities. one activity gets data from local database, but when I add information to database through another activity and back to the activity which shows the database contents, I don't see the changes! >> I need to re-run the applications to see the changes ! why and how to solve it ?
Upvotes: 1
Views: 153
Reputation: 9242
Ahh you probably need to re-bind your adapter, or call notifyDataSetChanged() on your adapter.
For instance, in your onResume() method call listView.setAdapter(new MySpecialAdapter()). That way no matter if your program is resumed from your other activity, or some other program, it will refresh the data.
Upvotes: 2