Hey, folks! I’m creating heavy AndroidViews (ads) ...
# compose
a
Hey, folks! I’m creating heavy AndroidViews (ads) inside
LazyVerticalGrid
and noticed that factory param in
AndroidView
Composable is called each time an item loses and obtains visibility. It’s not ideal, as creating and destroying heavy Views makes scroll not smooth due to janky frames. Is there any mechanism in Compose that would allow me recycle Views inside LazyVerticalGrid apart from creating a pool of Views and managing it myself?
z
Which version of compose are you using?
Are the composables otherwise the same? With the same
contentType
? The lazy lists in general try to re-use as much as possible, but it seems possible we might need to do more work to reuse android views as well.
a
I'm using Compose 1.2.1. Yep, composables with the android view are the same and using the same
contentType
z
Could you file a bug for this? Might be something special required to reuse android views inside lazy lists
r
Did you found any solution for this? Facing the same problem.