The document discusses MotionLayout, a library that allows for animations and transitions between layouts in Android using ConstraintLayout. Key components of MotionLayout include MotionScene, ConstraintSet, and Transition. ConstraintSet defines start and end states, Transition defines the animation between them, and MotionScene ties it all together. Custom attributes can also be animated between states.
3. DroidKaigi 2019
ConstraintLayout 2.0
• Helpers, Virtual Layouts, MotionLayout
• Announced at Google IO’18
• Built upon ConstraintLayout 1.1
• currently : alpha 3
• alpha 4 in a few weeks (?)
4. ConstraintSet
Encapsulate all the rules for a layout
Apply ConstraintSet to an existing layout
Switch between multiple ConstraintSets
Basic animation capabilities using TransitionManager
5. Droidkaigi 2019
Documentation
• Medium Articles:
• Introduction to MotionLayout part I http://bit.ly/2O4AmIz
• Introduction to MotionLayout part II http://bit.ly/2uPuWbw
• Introduction to MotionLayout part III http://bit.ly/2zRjCSj
• Introduction to MotionLayout part IV http://bit.ly/2QqfJaF
• GitHub:
• https://github.com/googlesamples/android-ConstraintLayoutExamples
39. Custom Attributes
• Extension to ConstraintSet
• Define values for any attribute
• Specify the type
• Specify the setter name
string
color
integer
float
dimension
boolean
85. Introducing CycleEditor
• Explore the capabilities of KeyCycles
• XML shown compatible with alpha3
• Features:
• Graph multiple cycles
• Simulate keyCycles effect on a button
86. KeyTimeCycle
•Period - 1/s (Hz)
•Offset - shifts the envelope
•Attributes - set amplitude of wave
Same attributes as KeyCycle
137. Droidkaigi 2019
Documentation
• Medium Articles:
• Introduction to MotionLayout part I http://bit.ly/2O4AmIz
• Introduction to MotionLayout part II http://bit.ly/2uPuWbw
• Introduction to MotionLayout part III http://bit.ly/2zRjCSj
• Introduction to MotionLayout part IV http://bit.ly/2QqfJaF
• GitHub:
• https://github.com/googlesamples/android-ConstraintLayoutExamples
138. Droidkaigi 2019
Give us feedback!
• Issue tracker:
• http://issuetracker.google.com
• ConstraintLayout component
• Twitter
• Nicolas Roard - @camaelon
• John Hoford - @johnhoford
• Takeshi Hagikura - @thagikura