0
フラグメント間のアニメーションが必要です。 2番目のフラグメントは右下からスライドし、最初のフラグメント(現行のフラグメントはそのままの状態にします)がFABボタンをクリックすると発生します。フラグメント間のアニメーション
私が試したこと。
ft.setCustomAnimations(R.anim.slide_in_from_bottom_right,R.anim.stay);
ft.replace(R.id.sample_content_fragment, fragment, "XYZ");
ft.addToBackStack("XYZ");
Bundle bundle = new Bundle();
fragment.setArguments(bundle);
ft.commit();
slide_in_from_bottom_right.xml
: -
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:fromYDelta="100%p" android:fromXDelta="100%p" android:toYDelta="0%p"
android:duration="600"
android:fillAfter="true"
android:interpolator="@android:anim/linear_interpolator"
/>
</set>
stay.xml
: - 。
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<translate android:duration="600"/>
</set>
問題は、私は実際にスライド私がここで見逃している何 見ることができないと思っているのですか?
https://stackoverflow.com/questions/4932462/animate-the-transition-between-fragmentsを参照してください。 –