44.6 Adding an Attribute Keyframe to the Transition
So far the example project is only animating the motion of the button view from one location on the screen to another. Attribute keyframes (KeyAttribute) provide a way to specify points within the transition timeline at which other attribute changes are to have taken effect. A KeyAttribute could, for example, be defined such that the view must have increased in size by 50% by the time the view has moved 30% of the way through the timeline. For this example, we will add a rotation effect positioned at the mid-point of the animation.
Begin by opening the activity_main.xml file in the MotionLayout Editor, selecting the transition connector arrow to display the timeline, then click on the button highlighted in Figure 44-13:
Figure 44-13
From the menu, select the KeyAttribute option:
Figure 44-14
Once selected, the dialog shown in Figure 44-15 will appear. Within the dialog, make sure the ID option is selected...