Ich möchte Animation zwischen Fragmenten. Das zweite Fragment sollte von rechts unten herausrutschen und das erste (aktuelles Fragment sollte so bleiben wie es ist) sollte beim Klick auf eine FAB-Taste passieren.Animation zwischen Fragmenten
Was ich versucht habe.
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>
Das Problem ist, dass ich nicht in der Lage bin die eigentliche Gleiten in sehen Was ich hier verpasst haben.?
siehe https://stackoverflow.com/questions/4932462/animate-the-transition-between-fragments –