lsiret
03/03/2022, 7:53 PMComposeView (basically a TextView) Inside a androidx ConstraintLayout inside a ViewHolder. We notice that when the ViewHolder is Recycled, the ComposeView is not resized. It means that for a multi line text, sometimes the ComposeView is too small (we lose line) or too big (unwanted margin).
We tried .disposeComposition() inside the Adapter onRecycled,
We tried
setViewCompositionStrategy(
ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed
)
The only thing that worked is ti disable the Recycling setMaxRecycledViews( 0 ) but we lose benefit of RecyclerViewlsiret
03/03/2022, 8:49 PM