Compose phases. Episode 2 of MAD Skills —  Compose… | by Jolanda Verhoef | Android Developers | Feb, 2023

Three phases
Two boxes. The left box shows code of a composable function, highlighted line by line. An arrow moves to a next box, where a tree structure is built node by node. This box is annotated with the term “UI tree”. An arrow points to one of the nodes saying “Layout Node”.
The Composition phase executes composable functions and creates a tree that represents your UI.
Two boxes. The left box shows the tree structure from the previous image. An arrow points to the right box. The right box shows a phone screen, with an animation of dotted orange rectangles being added to that screen. Those boxes represent the various elements of the UI.
The Layout phase measures and places each layout node in the UI tree.
Two boxes. Left box shows the screen with orange dotted lines from the last image. The right box shows those dotted lines being animated into a screen of a sample application, where each dotted box maps to an element on the screen.
The drawing phase draws the pixels on the screen.

Composition phase

Screenshot of app article screen, highlighting a round image showing Florina’s avatar, with her name next to it and another line of text that says “July 09, 1 minute read”

Layout phase

Drawing phase

Two boxes. Left one shows composables with modifiers added to them. Right side shows the tree structure from before, but now with boxes wrapping the nodes, representing how the modifiers are wrapper nodes.
The tree structure from before, but now each node is just a simple layout, with a lot of modifier wrapping nodes around it.
It’s modifiers all the way down!

Next Post

Security And Exchanges Commission Goes Hard On Firms Offering Crypto Advice: Seeks Disclosure Standards

Public outlined crypto corporations intending to go community have confronted growing scrutiny above the previous 12 months from the Securities and Trade Commission (SEC). THE SEC has instructed these types of publicly listed corporations to disclose their crypto exposure to the fee. The US SEC now considers numerous greatly traded […]
Security And Exchanges Commission Goes Hard On Firms Offering Crypto Advice: Seeks Disclosure Standards

You May Like