robnik
04/26/2021, 12:56 AMBryan Herbst
04/26/2021, 1:40 AMrobnik
04/26/2021, 2:08 AMJulianK
04/26/2021, 9:20 AMsetContent {
WindowCompat.setDecorFitsSystemWindows(window, false)
ProvideWindowInsets {
Bryan Herbst
04/26/2021, 11:47 AMrobnik
04/28/2021, 5:52 PMBryan Herbst
04/28/2021, 6:05 PMsystemBarsPadding()
? I’m guessing you are applying a background Modifier after the padding. If you apply a background before the padding then the padding will have the right background colorrobnik
04/28/2021, 6:13 PMScaffold(topBar = {
TopAppBar(modifier = Modifier.systemBarsPadding(),
title = { },
navigationIcon = { BackButton() { nav.navigateUp() } },
actions = {
IconButton( { add() }) { Icon(Icons.Default.Add, "Add") }
IconButton( { edit() }) { Icon(Icons.Default.Edit, "Edit") }
)
}) {
LazyColumn() {
items(vm.workouts) { workout ->
...
}
}
}
Bryan Herbst
04/28/2021, 6:21 PMbackground()
modifier before systemBarsPadding()
, otherwise you are adding transparent padding so you’ll see the color of the Scaffoldrobnik
04/28/2021, 6:35 PMBryan Herbst
04/28/2021, 6:47 PMrobnik
04/28/2021, 7:23 PM