Summary
This chapter explored the predefined layouts of Row()
, Column()
, and Box()
. You learned how to combine them to create beautiful UIs. You were also introduced to ConstraintLayout
, which places composables that are relative to others on the screen and flattens the UI element hierarchy.
The second main section explained why the layout system in Jetpack Compose is more performant than the traditional View-based approach. We looked at some of the internals of the Compose runtime, which prepared us for the final main section of this chapter, Creating custom layouts, where you learned how to create a custom layout and thus gain precise control over the rendering of its children.
The next chapter, Chapter 5, Managing State of Your Composable Functions, will deepen your knowledge of state. We will look at advanced use cases and learn more about Jetpack Compose’s reactive state primitives.