I got a trouble when I do an animation between an activity and a fragment the animation for the activity is not working only the fragment move.
FragmentTransaction transaction = activity.getFragmentManager().beginTransaction();
transaction.setCustomAnimations(R.animator.slide_in_from_left, R.animator.slide_in_from_right);
transaction.replace(R.id.main_content, fragment);
transaction.addToBackStack(null);
transaction.commit();
The activity should go on the right, but the activity don't move. I try this code for switching one fragment to another fragment and the previous fragment move on the right all works correctly. Why when I use this on activity he doesn't move ?