Home > front end >  Element after LazyColumn (Keep scrolling LazyColumn)
Element after LazyColumn (Keep scrolling LazyColumn)

Time:01-22

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

CodePudding user response:

You can probably use item to achieve this:

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