Search code examples
androidkotlinuser-interfaceoverlapandroid-jetpack-compose

How can i overlap list item on each other in android jetpack compose?


enter image description here

I want to implement this ui. How can i overlap post list item on each other in android jetpack compose?


Solution

  • If you're using a Column or a LazyList to display the items, you can use the verticalArrangement parameters with a negative spacedBy space.

    LazyColumn(
        verticalArrangement = Arrangement.spacedBy((-32).dp)
    ) {
        // Put the items to overlap here
    }
    

    spacedBy() doc