.Popbackstack () fragmentation issue;
could not solve the problem with Fragments back stack. When I try to pop up it throws errors:
Could not find class 'android.support.v4.app.FragmentTransitionCompat21 $ 1' referenced by android.support.v4.app.FragmentTransitionCompat21.setEpicenter class Could not find class 'android.support.v4.app.FragmentTransitionCompat21 $ 3', on which is referenced by android.support.v4.app.FragmentTransitionCompat21.setSharedElementEpicenter method
and when pressed again, it will work.
My code:
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.fragment_place, fragment, fragmentTag);
fragmentTransaction.addToBackStack(null);
fragmentTransaction.commit();
Pop:
int stackCount = getSupportFragmentManager().getBackStackEntryCount();
if (stackCount > 0) {
getSupportFragmentManager().popBackStackImmediate();
}
+3
source to share
No one has answered this question yet
Check out similar questions: