Engineering / android-compose
Modern Android development with Jetpack Compose as the default UI toolkit and Material 3 Expressive as the default design direction, a dated snapshot.
Signierte, abgestufte Provenienz für diesen Skill. Integrität, Urheberschaft, Capability und Aktualität als Beleg, den du abwägst, nicht als Verifiziert-Badge.
This skill defaults new Android UI to Jetpack Compose and Material 3 Expressive as the design direction, captured as a dated snapshot. The paradigms (declarative UI, state hoisting, unidirectional data flow, Material 3 theming) move slowly. The exact version numbers, the Compose compiler setup, and which Expressive APIs are stable move fast, so those facts are dated and meant to be re-verified.
date in frontmatter). Targets Compose BOM 2026.06.00 (core Compose 1.11.x, material3 1.4.0), Kotlin 2.4.0, Android 16 / API 36. Each reference file carries its own Verified date.androidx.compose.material3:material3 1.5.0-alpha behind @ExperimentalMaterial3ExpressiveApi; stable material3 is 1.4.0 (baseline M3). Default to Expressive intent, opt into the experimental APIs explicitly, and fall back to stable baseline M3 where you need stable surface. Re-check whether 1.5.0 has gone stable before assuming it has. See references/material3-expressive.md.gradle/libs.versions.toml and the module build.gradle.kts for the Compose BOM, material3, Kotlin, AGP, compileSdk/targetSdk. The installed versions decide which APIs and pitfalls apply. Never assume from memory.Verified date, or a new Compose BOM / Kotlin / Android major has shipped, treat its version-specific claims (artifact versions, "experimental vs stable", breaking changes) as suspect and confirm against the AndroidX release notes. The paradigm sections age far slower.Verified line. Maintainers: see MAINTENANCE.md.ViewModel as an immutable data class exposed via StateFlow.remember/derivedStateOf. Pass stable types and @Immutable data; memoize only when profiling says so.MaterialExpressiveTheme, motion with MotionScheme, reach for the expressive components, but keep the experimental opt-in honest. See references/material3-expressive.md.org.jetbrains.kotlin.plugin.compose), versioned with Kotlin. The old composeOptions { kotlinCompilerExtensionVersion } is obsolete.collectAsStateWithLifecycle(), not collectAsState(), so collection pauses in the background.libs.versions.toml version catalog. Go edge-to-edge by default (enableEdgeToEdge(); enforced at targetSdk 35+).app/src/main/java/com/example/app/MainActivity.kt enableEdgeToEdge() + setContent { AppTheme { ... } }ui/theme/ Color.kt, Type.kt, Shape.kt, Theme.kt (MaterialExpressiveTheme)<feature>/ screen composables + per-feature ViewModel + UiStatecomponents/ reusable composablesdata/<feature>/ repository + data sources (Room, DataStore, network)di/ Hilt modulesnavigation/ type-safe routes + NavHost (or Nav3 NavDisplay)gradle/libs.versions.toml the version catalog (single source of versions)
Consult these based on the task. Each carries its own Verified date.
Compose core
Design and Material 3 Expressive
Navigation and data
composable<T>, toRoute), nested graphs, passing arguments, ViewModel scoping, and Navigation 3 (you own the back stack) - See references/navigation.mdBuild, test, interop, pitfalls
kotlin@Composablefun CounterScreen(viewModel: CounterViewModel = hiltViewModel()) {val state by viewModel.uiState.collectAsStateWithLifecycle()CounterContent(count = state.count, onIncrement = viewModel::increment)}@Composablefun CounterContent(count: Int, onIncrement: () -> Unit) {Button(onClick = onIncrement) { Text("Count: $count") }}
kotlindata class CounterUiState(val count: Int = 0)class CounterViewModel : ViewModel() {private val _uiState = MutableStateFlow(CounterUiState())val uiState: StateFlow<CounterUiState> = _uiState.asStateFlow()fun increment() = _uiState.update { it.copy(count = it.count + 1) }}
kotlin@OptIn(ExperimentalMaterial3ExpressiveApi::class)@Composablefun AppTheme(content: @Composable () -> Unit) {val scheme = if (isSystemInDarkTheme()) darkColorScheme() // no expressive dark variantelse expressiveLightColorScheme()MaterialExpressiveTheme(colorScheme = scheme, motionScheme = MotionScheme.expressive(), content = content)}
kotlinLazyColumn {items(items = users, key = { it.id }) { user -> UserRow(user) }}
kotlin@Serializable data class Profile(val userId: String)composable<Profile> { backStackEntry ->val args = backStackEntry.toRoute<Profile>()ProfileScreen(userId = args.userId)}