1

Does LazyColumn have a buffer. If yes, how can I set it up?

The last element of the list takes a long time to load due to the video. Can I put it in a buffer, or is there another way to keep it from loading every time? How can I increase the number of items to load?

1 Answers1

0

I don't think that there is a way to increase the number of items to load but you can try lazy block for the last video item. This composes the composable when it has to show on the screen. This should not compose the last element again and again. Hope this will help.

LazyColumn {
    items(/* list */) { index ->
        if(/* condition to check for the last index */) {
            lazy {
                // video composable
            }
        }
        else {
            // other composable
        }
    }
}
Atul Sharma
  • 399
  • 3
  • 12