Reputation: 450
I have a drop down (connected with db) in every fragment (4 fragments in one fragment activity).
Problem is that when I come back from AddNew intent the drop down list still contains the previous data. All I want is to refresh the data in drop down(s).
I have tried writing the following code but it gets stuck in a loop calling it self again and again.
public void OnResume()
{
super.onResume();
this.finish();
startActivity(getIntent());
}
Upvotes: 0
Views: 893
Reputation: 30601
You need to call notifyDataSetChanged()
on the Adapter
s of your Fragment
s when you want to refresh the data.
Upvotes: 1