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

Akram Bensalem

09/21/2021, 8:39 AM
Hi, I integrate Google Map in one of Compose Screen but it's freeze for a bit of time, Is there any solution to prevent blocking the UI ? the freezing is because I use :
Copy code
val mapView = rememberMapViewWithLifecycle()
b

Big Chungus

09/21/2021, 8:42 AM
Show a loading indicator until the map widget is ready? This is working under the assumption that the map widget is actually freezing as opposed to the entire app.
Also double check that you're not doing any IO on main thread to load it
a

Akram Bensalem

09/21/2021, 8:43 AM
yes, that looks a great solution, but I wander how to check if the map widget is ready or not ? 🤔
b

Big Chungus

09/21/2021, 8:44 AM
Browse the docs. I'm not familiar with that api so can't comment more. Just spitballing ideas here 😀
a

Akram Bensalem

09/21/2021, 8:45 AM
yes I will, thank you
b

Big Chungus

09/21/2021, 8:45 AM
Good luck!