Summary
This chapter covered creating animations and transitions with CoordinatorLayout
and MotionLayout
. Animations can improve the usability of our app and make it stand out compared to other apps.
We started by customizing the transition when opening and closing an activity with activity transitions. We also learned about adding shared element transitions when an activity and the activity that it opens both contain the same elements so that we can highlight this link between the shared elements to the users.
We learned how we can use CoordinatorLayout
to handle the motion of its child views. Some views have built-in behaviors that handle how they work inside CoordinatorLayout
. You can add custom behaviors to other views too. Then, we moved on to using MotionLayout
to create animations by specifying the start constraint, end constraint, and the transition between them. We also looked into modifying the motion path by adding keyframes in the middle of the animation. We learned...