https://kotlinlang.org logo
#compose
Title
# compose
c

caelum19

07/18/2020, 9:48 PM
Hey, how can I stop a view from being recreated on recomposition using AndroidView with the resId parameter?
r

romainguy

07/18/2020, 10:08 PM
It doesn’t get recreated, at least not in my case on dev14
h

Halil Ozercan

07/18/2020, 10:28 PM
Believe me I tried, it doesn't get recreated 😄
Are you sure you are not passing a state parameter or consuming an ambient in your AndroidView?
c

caelum19

07/19/2020, 11:29 AM
I think I was mis-interpreting duplicated id errors from another source - my bad 🙂
I am having difficulties with another issue now though, I've a condition to display a composable containing the AndroidView and when the mutableState in the condition changes and displays the first time, it is fine, but on the second time the AndroidView is missing
Any thoughts?
3 Views