Hello all, I am running into an issue with ModalBo...
# compose
b
Hello all, I am running into an issue with ModalBottomSheetLayout and my dark theme. I hide the bottom navigation (tab bar) on some screens. However when I do that the space that the bottom navigation bar took up is white (not pretty in dark theme), for a moment while the bottom bar is hidden. Code in reply, not sure where to start debugging on why this is happening.
Copy code
ModalBottomSheetLayout(bottomSheetNavigator) {
   Scaffold(
      bottomBar = {
         AnimatedVisibility(
            visible = bottomBarVisibility,
            enter = fadeIn(animationSpec = tween()),
            exit = fadeOut(animationSpec = tween()),
            content = {
            ...
I can wrap the bottomBar content with a composable with a background to “fix” the issue. Not sure if that is just masking an issue with my code, or a viable fix.
Copy code
bottomBar = {
   Box(Modifier.background(MaterialTheme.colorScheme.surface)) {
      AnimatedVisibility(
         visible = bottomBarVisibility,
         enter = fadeIn(animationSpec = tween()),
         exit = fadeOut(animationSpec = tween()),
         content = {
i
What is the
windowBackground
of the theme of your activity? That's the default background color when there are no composables drawing anything over it
b
Copy code
<item name="android:windowBackground">@android:color/black</item>
Looks like maybe the Scaffold backgroundColor is what I want:
Copy code
Scaffold(
   backgroundColor = MaterialTheme.colorScheme.surface
   ...