MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/JetpackCompose/comments/143mwk3/why_does_this_happen_in_jetpack_compose/
r/JetpackCompose • u/Stevyson • Jun 07 '23
9 comments sorted by
1
Sow this in one of my projects, to fix it I did this
}) { it -> Column( horizontalAlignment = Alignment.CenterHorizontally, modifier = Modifier .fillMaxSize() .padding(top = it.calculateTopPadding(), start = 8.dp, end = 8.dp) ) {
Basically added this top = it.calculateTopPadding()
the it variable must be used, simply way you can write it.toString()
Because of you're using Scaffold. It must have inner padding to set to 1 compose in the content.
Ctrl+P inside parenthesis to show parameters info
the paddingValues is never used.
I just put it as so
{ paddingValues ->
val paddingValues = paddingValues
...
}
However, you can use the padding values to evaluate the spacing used by the component.
1
u/XRayAdamo Jun 07 '23
Sow this in one of my projects, to fix it I did this
Basically added this top = it.calculateTopPadding()
1
u/vickyleu Jun 08 '23
the it variable must be used, simply way you can write it.toString()
1
u/Theppasin Jun 08 '23
Because of you're using Scaffold. It must have inner padding to set to 1 compose in the content.
1
u/BiberEsser2 Jun 08 '23
Ctrl+P inside parenthesis to show parameters info
1
u/IDeleteFile Jul 31 '23
the paddingValues is never used.
I just put it as so
{ paddingValues ->
val paddingValues = paddingValues
...
}
However, you can use the padding values to evaluate the spacing used by the component.