I'm facing a weird issue with the latest stable version of Jetpack compose. When I was using version 1.0.5 everything was fine with LazyColumn
I'm migrating an app from Jetpack compose version 1.0.5
to 1.1.1
but when I run the app, it shows some vertical gap between the LazyColumn
items
When I checked, the contentPadding
it still 0.dp
on the LazyDsl.kt
contentPadding: PaddingValues = PaddingValues(0.dp)
I also haven't used any verticalArrangement
TIA
After spending lots of hours, I found that the padding was generated by onClick
on JetpackCompose
Card
. I fixed it using Modifier.clickable{}
as below:
Before
Card(
elevation = paddingZero,
onClick = {
// listener here
}
)
After
Card(
elevation = paddingZero,
modifier = Modifier.clickable {
// listener here
}
)
This fixed my issue. I hope this can be helpful to someone who is having same issue.