Created
June 11, 2014 08:23
-
-
Save danieldisu/4bff6c51396135b54068 to your computer and use it in GitHub Desktop.
Android Fragment Animations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getFragmentManager().beginTransaction() | |
.setCustomAnimations(R.animator.right_in, R.animator.right_out) | |
.remove(yourFragment) | |
.commit(); | |
getFragmentManager().beginTransaction() | |
.setCustomAnimations(R.animator.right_in, R.animator.right_out) | |
.add(R.id.fragmentContainer, yourFragment, "yourFragment") | |
.commit(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="y" | |
android:valueFrom="1000" | |
android:valueTo="0" | |
android:valueType="floatType"/> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="y" | |
android:valueFrom="0" | |
android:valueTo="1000" | |
android:valueType="floatType"/> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="x" | |
android:valueFrom="-1000" | |
android:valueTo="0" | |
android:valueType="floatType"/> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:duration="@android:integer/config_shortAnimTime" | |
android:propertyName="x" | |
android:valueFrom="0" | |
android:valueTo="-1000" | |
android:valueType="floatType"/> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:propertyName="x" | |
android:valueType="floatType" | |
android:valueFrom="1000" | |
android:valueTo="0" | |
android:duration="@android:integer/config_shortAnimTime" /> | |
</set> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<set> | |
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" | |
android:propertyName="x" | |
android:valueType="floatType" | |
android:valueFrom="0" | |
android:valueTo="1000" | |
android:duration="@android:integer/config_shortAnimTime" /> | |
</set> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment