fix: status and navigation bar colors don't follow the current theme #40
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The system status bar and navigation bar use the platform default (black background, dark icons) and don't follow the active theme. In dark mode the bar background is dark but the OS-drawn text/icons inside it remain dark, producing the "black text on dark mode" look that is hard to read.
Repro
Expected
Status bar and navigation bar tint to match
MaterialTheme.colorScheme.background(or surface), and the foreground icon color flips viaWindowInsetsControllerCompat.isAppearanceLightStatusBars / isAppearanceLightNavigationBarsso the OS-drawn glyphs stay legible in both light and dark mode.Implementation hint
The app already provides two helpers in
app/src/main/java/dev/achmad/ledgerr/ui/theme/Theme.kt:StatusBarColor(color: Color)NavigationBarColor(color: Color)Wire them up at the top of
AppTheme(or in the rootActivitycontent) so every screen inherits the right tint. Pair the color with the light/dark appearance flag so icons flip correctly.Scope
Applies app-wide — single fix in the theme entry point is enough; do not sprinkle calls into individual screens.