I'm trying to replace a fragment from a container with another fragment. for this I use this code:
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
transaction.setCustomAnimations(R.anim.open_next, R.anim.close_next, R.anim.open_main, R.anim.close_next);
transaction.replace(R.id.frag_container, new Activity_SendTrack(), "newFragment");
transaction.addToBackStack("Activity_Fragment2");
transaction.commit();
Everything goes perfectly with one exception, the incoming fragment is animated below the outgoing fragment. I want the new incoming fragment to be displayed above the outgoing fragment. how can i solve the problem?