I have an activity that loads a Fragment A in it. Fragment A contains ListView and when clicking on list item I load another Fragment B in place of Fragment A to show the listvi
In my case
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.anim.slide_in_left,
android.R.anim.slide_out_right,
R.anim.slide_in_right,
R.anim.slide_out_left);
ft.replace(R.id.fragment_container, targetFragment).addToBackStack(null).commit();
this line
ft.setCustomAnimations(android.R.anim.slide_in_left, android.R.anim.slide_out_right,
R.anim.slide_in_right, R.anim.slide_out_left);
would create perfect animation.
slide_in_right
slide_out_left