Chris Johnson
05/17/2024, 8:17 PMNavigationBar
and NavigationBarItem
and it seems there's some color being applied to it so even going edgeToEdge doesn't seem to work. Code && pictures in 🧵Chris Johnson
05/17/2024, 8:19 PMStylianos Gakis
05/17/2024, 8:23 PMChris Johnson
05/17/2024, 8:27 PMColumn {
DestinationNavHost(modifier = Modifier.weight(1f)) {}
NavigationBar(
modifier = modifier,
containerColor = bottomBarContainerColor,
) {
NavigationBarItem(selected = true, onClick = {}, icon = {}, label = { Text(text = "HA")})
NavigationBarItem(selected = true, onClick = {}, icon = {}, label = { Text(text = "HA")})
NavigationBarItem(selected = true, onClick = {}, icon = { , label = { Text(text = "HA")})
}
}
And my theme:
SideEffect {
val window = activity.window
WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme
}
MaterialTheme(
colorScheme = colorScheme,
content = content
)
Chris Johnson
05/17/2024, 8:28 PMStylianos Gakis
05/17/2024, 8:32 PMedgeToEdge()
instead of doing stuff on WindowCompat?
Here's what we do btw https://github.com/HedvigInsurance/android/blob/fd9c40275e2741c432204222d978b7d7ef[…]/app/app/src/main/kotlin/com/hedvig/android/app/ui/HedvigApp.ktAlex Styl
05/17/2024, 8:38 PM<item name="android:enforceNavigationBarContrast">false</item>
in your xml themeStylianos Gakis
05/17/2024, 8:43 PMChris Johnson
05/17/2024, 8:44 PM<item name="android:enforceNavigationBarContrast">false</item>
probably won't work because we support <29 but I'm gonna keep playing with it.
👀 looking at your app again Stylianos 😄Stylianos Gakis
05/17/2024, 8:49 PMenableEdgeToEdge
?
I think when I migrated to that is when I managed to get rid of a bunch of leftover styles and whatever.
Now our style is just basically nothing https://github.com/HedvigInsurance/android/blob/fd9c40275e2741c432204222d978b7d7efd7d446/app/app/src/main/res/values/themes.xml#L3-L6 + https://github.com/HedvigInsurance/android/blob/fd9c40275e2741c432204222d978b7d7efd7d446/app/app/src/main/res/values-night/themes.xml#L3
The only thing left is smth for the splash screenChris Johnson
05/17/2024, 8:49 PMChris Johnson
05/17/2024, 8:50 PMStylianos Gakis
05/17/2024, 8:52 PMSystemBarStyle.auto
it will try to be smart about some contrast or whatever.
Which is exactly why I do explicitly .dark and .lightStylianos Gakis
05/17/2024, 8:54 PMChris Johnson
05/17/2024, 8:54 PMenableEdgeToEdge()
Stylianos Gakis
05/17/2024, 8:56 PMChris Johnson
05/17/2024, 9:04 PMStylianos Gakis
05/17/2024, 9:18 PM