With RecyclerView, I can make some ViewHolder not recyclable (follow some answers in
I want my RecyclerView to not recycle some items).
Can I make LazyColumn to not recompose some items (similar to make RecyclerView don't recycle some ViewHolder)? I have few items in LazyColumn with some big images, it recompose after scrolling down and up so scroll is not smooth.
You can do this by using the PinnableContainer interface. LazyColumn implements this interface on its items.
item {
val handle = LocalPinnableContainer.current?.pin() //won't recompose offscreen
handle.release() //when you are done
}
PinnableContainer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With