Bjarne Gelotte
09/26/2021, 9:13 AMelevationSurfaceselevationBjarne Gelotte
09/26/2021, 9:14 AMLazyColumnBjarne Gelotte
09/26/2021, 9:14 AM@Composable
private fun List() {
    Surface(
        modifier = Modifier.fillMaxWidth(),
        color = Color.White
    ) {
        LazyColumn(modifier = Modifier.fillMaxSize()) {
            item { Spacer(modifier = Modifier.padding(4.dp)) }
            item { ListItem(text = "Item 1") }
            item { ListItem(text = "Item 2") }
            item { ListItem(text = "Item 3") }
        }
    }
}
@Composable
private fun ListItem(text: String) {
    Surface(
        modifier = Modifier
            .fillMaxWidth()
            .padding(start = 8.dp, end = 8.dp),
        color = Color.White,
        elevation = 2.dp
    ) {
        Text(
            modifier = Modifier.padding(4.dp),
            text = text
        )
    }
}Nabeel
09/26/2021, 11:28 AMBjarne Gelotte
09/26/2021, 12:48 PMTextLazyColumnalorma
09/26/2021, 2:34 PMModifier.zIndex(1f)Bjarne Gelotte
09/26/2021, 2:53 PMzIndex(1f)Zach Klippenstein (he/him) [MOD]
09/27/2021, 3:14 PMBut what if I want to add a header (Sure it does, in the example you posted. But in that example, it doesn’t make sense to use a lazy column in the first place because there are so few items in the group. Does your real code have a lot more items per card group?) to theText, above the card, with no elevation? Then that approach doesn’t work, right?LazyColumn
Bjarne Gelotte
09/27/2021, 3:26 PMLazyColumnBjarne Gelotte
10/04/2021, 8:16 AMLazyColumn