Created
January 24, 2021 09:09
-
-
Save SurajBahadur/2fdf29e4248d3ecb6405701b55a651d7 to your computer and use it in GitHub Desktop.
Slide Animation Between activities In Android
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_mediumAnimTime" | |
android:fromXDelta="-100%p" | |
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_mediumAnimTime" | |
android:fromXDelta="100%p" | |
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_mediumAnimTime" | |
android:fromXDelta="0" | |
android:toXDelta="-100%p" /> | |
</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_mediumAnimTime" | |
android:fromXDelta="0" | |
android:toXDelta="100%p" /> | |
</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
<!-- Base application theme. --> | |
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> | |
<!-- Customize your theme here. --> | |
<item name="colorPrimary">@color/colorPrimary</item> | |
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> | |
<item name="background">@color/colorPrimaryDark</item> | |
<item name="colorAccent">@color/colorAccent</item> | |
<item name="android:fontFamily">@font/raleway</item> | |
<!-- Add custome animation--> | |
<item name="android:windowAnimationStyle">@style/CustomActivityAnimation</item> | |
</style> | |
<style name="CustomActivityAnimation" parent="@android:style/Animation.Activity"> | |
<item name="android:activityOpenEnterAnimation">@anim/slide_in_right</item> | |
<item name="android:activityOpenExitAnimation">@anim/slide_out_left</item> | |
<item name="android:activityCloseEnterAnimation">@anim/slide_in_left</item> | |
<item name="android:activityCloseExitAnimation">@anim/slide_out_right</item> | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment