@ -17,8 +17,11 @@
package com.google.samples.apps.nowinandroid.ui
import androidx.annotation.StringRes
import androidx.compose.foundation.layout.captionBarPadding
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AutoStories
import androidx.compose.material.icons.filled.Bookmarks
@ -45,8 +48,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.google.accompanist.insets.ProvideWindowInsets
import com.google.accompanist.insets.systemBarsPadding
import com.google.samples.apps.nowinandroid.R
import com.google.samples.apps.nowinandroid.ui.theme.NiaTheme
@ -54,7 +55,6 @@ import com.google.samples.apps.nowinandroid.ui.theme.NiaTheme
@Composable
fun NiaApp ( ) {
NiaTheme {
ProvideWindowInsets {
val navController = rememberNavController ( )
val navigationActions = remember ( navController ) {
NiaNavigationActions ( navController )
@ -75,14 +75,13 @@ fun NiaApp() {
NiaNavGraph (
navController = navController ,
modifier = Modifier
. systemBarsPadding ( bottom = false )
. statusBarsPadding ( )
. padding ( padding )
)
}
}
}
}
}
@Composable
private fun NiABottomBar (
@ -93,7 +92,7 @@ private fun NiABottomBar(
// navigation is equal to the container color of the navigation bar.
Surface ( color = MaterialTheme . colorScheme . surface ) {
NavigationBar (
modifier = Modifier . systemBarsPadding( top = false ) ,
modifier = Modifier . navigationBarsPadding( ) . captionBarPadding ( ) ,
tonalElevation = 0. dp
) {
TOP_LEVEL_DESTINATIONS . forEach { dst ->