I am using Fragment activity and a number of fragments to get added and poped out on back press.
Supposed I am adding Fragment B from Fragment A. The title of action bar that I set in A changes by navigating to B; but it is not restoring to A when I pop the fragment B out of the fragment stack as onResume of fragment is not being called.
I am using the code:
FragmentManager fragmentManager = getSupportFragmentManager();
fragmentManager.beginTransaction().add(R.id.container, fragmentToReplace, tag).addToBackStack(tag).commit();
and to pop out the last fragment:
fragmentManager.popBackStack();
How to manage this. Please suggest.