-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Android Studio 4.1 Development Essentials – Java Edition
By :

43.9 Time Linearity
In the absence of any additional settings, the animations outlined above will be performed at a constant speed. To vary the speed of an animation (for example so that it accelerates and the decelerates) the transition easing attribute (transitionEasing) can be used either within a ConstraintSet or Keyframe.
For complex easing requirements, the linearity can be defined by plotting points on a cubic Bézier curve, for example:
.
.
motion:layout_constraintBottom_toBottomOf="parent"
motion:transitionEasing="cubic(0.2, 0.7, 0.3, 1)"
android:rotation="360">
.
.
If you are unfamiliar with Bézier curves, consider using the curve generator online at the following URL:
Change the font size
Change margin width
Change background colour