Slide Animation between Activities in Android

Published: 17 April 2020
on channel: Android Development Tutorials
105
4

Animation code

When your UI changes in response to user action, you should animate the layout transitions. These animations give users feedback on their actions and help keep them oriented to the UI.

Android includes the transitions framework, which enables you to easily animate changes between two view hierarchies. The framework animates the views at runtime by changing some of their property values over time. The framework includes built-in animations for common effects and lets you create custom animations and transition lifecycle callbacks.


slide_in_left.xml

translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="-100%p"
android:toXDelta="0"

slide_in_right.xml

translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="100%p"
android:toXDelta="0"

slide_out_left.xml

translate android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0"
android:toXDelta="-100%p"

slide_out_right.xml

translate android:duration="@android:integer/config_mediumAnimTime"
android:fromXDelta="0"
android:toXDelta="100%p"


Watch video Slide Animation between Activities in Android online without registration, duration hours minute second in high quality. This video was added by user Android Development Tutorials 17 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 105 once and liked it 4 people.