Created
March 25, 2015 16:31
-
-
Save patrickhammond/39b127bb53ca2022b200 to your computer and use it in GitHub Desktop.
Slide in and slide out animations.
This file contains hidden or 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 xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
android:duration="@android:integer/config_shortAnimTime" | |
android:fromXDelta="-100%" | |
android:toXDelta="0" /> | |
</set> |
This file contains hidden or 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 xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
android:duration="@android:integer/config_shortAnimTime" | |
android:fromXDelta="0%" | |
android:toXDelta="100%" /> | |
</set> |
This file contains hidden or 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 xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
android:duration="@android:integer/config_shortAnimTime" | |
android:fromXDelta="100%" | |
android:toXDelta="0" /> | |
</set> |
This file contains hidden or 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 xmlns:android="http://schemas.android.com/apk/res/android" > | |
<translate | |
android:duration="@android:integer/config_shortAnimTime" | |
android:fromXDelta="0%" | |
android:toXDelta="-100%" /> | |
</set> |
This file contains hidden or 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
public void doSomething() { | |
startActivity(intent); | |
overridePendingTransition(R.anim.open_slide_enter, R.anim.open_slide_exit); | |
} | |
@Override | |
public void finish() { | |
super.finish(); | |
overridePendingTransition(R.anim.close_slide_enter, R.anim.close_slide_exit); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment