试试这个代码
Fragment newFragment;
newFragment=new one_defalut();
FragmentTransaction transation=getFragmentManager().beginTransaction();
transation.setCustomAnimations(R.anim.slide_in_right, 0);
transation.replace(R.id.myfragment, newFragment);
transation.addToBackStack(null);
//transation.setTransitionStyle(FragmentTransaction.TRANSIT_FRAGMENT_FADE);
transation.commit();
slide_in_right.xml的代码
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="x"
android:valueType="floatType"
android:valueFrom="1280"
android:valueTo="0"
android:duration="300"/>
</set>