Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 716 Vote(s) - 3.48 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can i overlap list item on each other in android jetpack compose?

#1
[![enter image description here][1]][1]

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


[1]:
Reply

#2
Use [Box](

[To see links please register here]

.) to put one element on top of another.

Also, read official documentation [here](

[To see links please register here]

)
Reply

#3
You can use `Box`

sample :

Box(modifier = Modifier.fillMaxSize()) {
Image(modifier = Modifier.fillMaxSize()) {} //Image1
Image(modifier = Modifier.fillMaxSize()) {} //Image2
}

In the above example, Image2 will cover the Box's maxSize. Image1 will be beneath Image2.
Reply

#4
Adding to Bagadeshkumar R's answer, you can place Spacer with height that is `spacer(modifier = Modifier.height(8.dp))`, attribute between image 1 and 2, for image 1 to be partially visible.
Reply

#5
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][1]

[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through