https://kotlinlang.org logo
#compose
Title
# compose
l

Luis Daivid

11/07/2020, 5:00 AM
I added bottomNavigation to scaffold. However, the bottom of the content of the scaffold is covered by the bottom navigation. What should I do?
f

flosch

11/07/2020, 6:04 AM
Use the inner padding provided by the scaffold body lambda
👍 1
l

Luis Daivid

11/07/2020, 6:07 AM
Copy code
Scaffold(
    bottomBar = {
        ...
    },
) {
    NavHost(navController, startDestination = "one") {
        composable("one") { ... }
        composable("two") { ... }
        composable("three") { ... }
    }
}
where shoud i use?
Copy code
Do I have to pass the padding as a parameter for each composable?
j

jaqxues

11/07/2020, 8:45 AM
I suppose you can wrap NavHost inside a Box and use the paddings on the box
l

Luis Daivid

11/07/2020, 8:58 AM
@jaqxues thank you!