Android Theming
Apply semantic tokens, follow system appearance, and verify light and dark themes. Learn how with Lumen for Android / Compose.
Appearance
Choose and change the theme
Use a named theme at the app root to follow the device. Inside it, a theme scope inherits the nearest scheme or pins a single screen. LumenTheme also accepts your own Material colors, typography and shapes.
import com.santi020k.lumen.LumenNamedThemes
import com.santi020k.lumen.LumenThemeScope
LumenThemeScope(theme = LumenNamedThemes.Santi020k) {
AppNavigation()
LumenThemeScope(theme = LumenNamedThemes.Paper, darkTheme = false) {
Article()
}
}LumenTheme {
AppNavigation()
}var useDarkTheme by rememberSaveable { mutableStateOf(false) }
LumenTheme(darkTheme = useDarkTheme) {
AppNavigation()
}Style with semantic roles
LumenTheme provides both LocalLumenTheme and MaterialTheme. Prefer Lumen components and semantic roles so Lumen and Material content stay visually consistent inside the same hierarchy.
Verify both appearances
- Change the emulator or device appearance while the app is running.
- Check system bars, dialogs, fields, and disabled or error states in both schemes.
- Test large font sizes, high-contrast settings, and TalkBack descriptions.