Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Element after LazyColumn (Keep scrolling LazyColumn)

Might be pretty basic but I can’t figure it out. So my goal is to display some text after the last list item. But seems like scrolling down the LazyColumn just gets me to the last LazyColumn item therefore the text that goes afterwards is not visible.

I want to be able to keep scrolling

Column(modifier = Modifier.fillMaxSize()) {
 LazyColumn() {
  items(list) {
   //display list elements
  }
 }
 Spacer(modifier = Modifier.height(8.dp))
 Text(text = "end")

Example Image

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can probably use item to achieve this:

LazyColumn() {
  items(list) {
   //display list elements
  }
  item {
      Spacer(modifier = Modifier.height(8.dp))
      Text(text = "end")
  }
}
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading