Add a tag when you call your fragment from an action:
FragmentManager fm = getFragmentManager(); Fragment fragment = fm.findFragmentByTag( MagazineViewFragment.TAG); if (fragment == null) { MagazineViewFragment fragment = new MagazineViewFragment(); fragment.openStream(itemSelected); getFragmentManager() .beginTransaction() .add(R.id.container, fragment, MagazineViewFragment.TAG) .commit(); }
If you only need to update itemSelected - see broadcasts or listeners.
QArea source share