Lesson 03 · Android with Kotlin & Compose
Android: Jetpack Compose UI
Compose turns UI into a function of state: composable functions that run in any order, Column/Row/Box with ordered modifiers, Material 3 Scaffold screens, remember and mutableStateOf, state hoisting, @Preview, and LazyColumn lists that recycle with stable keys.
Prerequisites: Android: Android Studio & Your First App
Learning objectives
By the end of this lesson, you will be able to:
- Write @Composable functions and explain why they may execute in any order, must be idempotent, and can recompose in parallel
- Lay out UI with Column, Row and Box - steering main-axis arrangement and cross-axis alignment, and chaining modifiers in an order whose result you can predict
- Share space with fillMaxWidth and weight, and build screens with Material 3 Scaffold, TopAppBar and FloatingActionButton
- Hold UI state with remember and mutableStateOf, hoist it into stateless/stateful pairs, and preview the stateless half with @Preview
- Render long lists with LazyColumn, giving every row a stable key so recycling, reorders and item state behave