In setCustomAnimations (), animation requires four resource identifiers. Do not quite understand them. If someone gave a clearer picture of this, it would be helpful if you could explain.
Say by adding fragment A to the place and back.
FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.holder, fragA, FragmentA.FRAGMENT_NAME);
ft.addToBackStack(FragmentA.FRAGMENT_NAME);
ft.setCustomAnimations(R.anim.slide_in_from_bottom, R.anim.slide_in_from_top, R.anim.slide_in_from_left, R.anim.slide_in_from_right);
ft.show(frag);
ft.commit();
And replacing fragment B:
FragmentTransaction ft = fm.beginTransaction();
ft.replace(R.id.holder, fragB, FragmentB.FRAGMENT_NAME);
ft.addToBackStack(FragmentB.FRAGMENT_NAME);
ft.setCustomAnimations(R.anim.slide_in_from_bottom, R.anim.slide_in_from_top, R.anim.slide_in_from_left, R.anim.slide_in_from_right);
ft.show(frag);
ft.commit();
next time if popstack () is done
fm.popBackStackImmediate(FragmentB.FRAGMENT_NAME,
FragmentManager.POP_BACK_STACK_INCLUSIVE);
What kind of transactional animation will it perform?
public abstract FragmentTransaction setCustomAnimations(@AnimRes int enter,
@AnimRes int exit, @AnimRes int popEnter, @AnimRes int popExit);