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 explored 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, Managing the State of Your Composable Functions, will deepen your knowledge of state. We will examine the difference between stateless and stateful composable functions. Also, we will look at advanced use cases such as surviving configuration changes.