I am trying to achieve the following effect using FragmentTransaction.setCustomAnimations.
FragmentTransaction ft = ((AppCompatActivity) context).getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(0, R.anim.slide_out_to_right);
if (!fragment.isAdded())
{
ft.add(R.id.fragmentContainerFrameMyOrders, fragment);
ft.show(fragment);
}
else
ft.replace(R.id.fragmentContainerFrameMyOrders, fragment);
ft.commit();