Compose Bootcamp #1
9 min readMay 3, 2024
👨🏻‍💻What you’ll learn?
- What is Compose ?
- Building UI with Compose.
- How to reuse Composables ?
- Basic Compose Element : Column, Row, Box, Button
- Managing state in compose.
- What is state hoisting ?
- Creating a RecyclerView in Compose.
- How to add persistance to Configuration Changes in Compose ?
- Adding animations.
- How to Add styles and themes in our compose app ?
What is Compose ?
Let’s Build UI with Compose: we will build a compose app with list of animated expanding items.
A compose app is made with composable functions or composables annotated with @Composable annotaton.
Note * All Kotlin funcitons marked with @Composable annotation are called Composables.
First let’s setup the libary in build.gradle.kts
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
kotlin("plugin.serialization") version "1.8.10"
}
android {
// ... compose setups
buildFeatures {
compose = true
}…