CREATE LAYOUTSTATE
Measure with Yoga
Collect a list of items to be
drawn and their positions
Row
Image
Column
Text Text
(0, 0 - 640, 96)
(88, 0 - 640, 96)
(16, 16 - 80, 80)
(88, 16 - 624, 48) (88, 48 - 624, 80)
GOTCHAS
Use Diff for more granular control over transitions
Slide 143
Slide 143 text
GOTCHAS
Use Diff for more granular control over transitions
Can use @OnUpdateStateWithTransition if animating
only State changes
Slide 144
Slide 144 text
GRADUAL ADOPTION
Slide 145
Slide 145 text
GRADUAL ADOPTION
Slide 146
Slide 146 text
GRADUAL ADOPTION
Can't migrate the whole screen at once? Do step by step:
Slide 147
Slide 147 text
GRADUAL ADOPTION
Can't migrate the whole screen at once? Do step by step:
• Complex UI parts can be replaced with a LithoView and
underlying Component structure
Slide 148
Slide 148 text
GRADUAL ADOPTION
Can't migrate the whole screen at once? Do step by step:
• Complex UI parts can be replaced with a LithoView and
underlying Component structure
• Custom Views can be wrapped in MountSpecs
Slide 149
Slide 149 text
ADVANCED CONFIGURATION
Slide 150
Slide 150 text
COMPONENTTREE BUILDER
Slide 151
Slide 151 text
COMPONENTTREE BUILDER
Set of advanced settings
val tree = ComponentTree.create(c)
// ...
.build()
lithoView.componentTree = tree
Slide 152
Slide 152 text
COMPONENTTREE BUILDER
Set of advanced settings
• LayoutHandler
val tree = ComponentTree.create(c)
.layoutThreadHandler(lithoHandler)
.build()
lithoView.componentTree = tree
Slide 153
Slide 153 text
COMPONENTTREE BUILDER
Set of advanced settings
• LayoutHandler
• Reconciliation
val tree = ComponentTree.create(c)
.isReconciliationEnabled(true)
.build()
lithoView.componentTree = tree