Florian
12/06/2021, 8:38 PMFlorian
12/06/2021, 8:39 PM@Composable
private fun TaskItem(
[...]
) {
Card(
shape = RoundedCornerShape(Dimens.DefaultCardRoundedCornerSize),
elevation = Dimens.DefaultCardElevation,
modifier = modifier
.fillMaxWidth()
.padding(top = 12.dp)
.animateContentSize(),
onClick = { onTaskClicked(task) }
) {
Column {
[...]
}
Florian
12/06/2021, 8:40 PManimateContentSize
the shadows appear but only on the bottom, not on the sidesStylianos Gakis
12/06/2021, 9:11 PManimateContentSize
implementation you will see that it puts a clip modifier to the contents by itself and it’s not configurable for reasons explained by Doris Liu here:
https://kotlinlang.slack.com/archives/CJLTWPH7S/p1638385104410200?thread_ts=1638375155.392500&cid=CJLTWPH7S
I had the exact same problem and I fixed it simply by doing what she said, put that modifier on the only child of the card, and put all my composables inside that child instead. I just did it with a plain Box
but anything should work, you can put it on your Column
I guess since I see you have it there already.Florian
12/06/2021, 9:28 PMFlorian
12/06/2021, 9:28 PMFlorian
12/06/2021, 9:28 PMStylianos Gakis
12/06/2021, 9:29 PMFlorian
12/06/2021, 9:29 PMStylianos Gakis
12/06/2021, 9:29 PMFlorian
12/06/2021, 9:30 PMFlorian
12/06/2021, 9:30 PMFlorian
12/06/2021, 9:31 PMFlorian
12/06/2021, 9:34 PM