Android Refresh A Fragment List From Its Parent Activity
Answer : You can easily achieve this using INTERFACE MainActivity.java public class MainActivity extends Activity { public FragmentRefreshListener getFragmentRefreshListener() { return fragmentRefreshListener; } public void setFragmentRefreshListener(FragmentRefreshListener fragmentRefreshListener) { this.fragmentRefreshListener = fragmentRefreshListener; } private FragmentRefreshListener fragmentRefreshListener; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button b = (Button)findViewById(R.id.btnRefreshFragment); b.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(getFragmentRefreshListener()!=null){ getFragmentRefreshListener().onRefresh(); } } }); } publi...