Hi there, I'm having very weird and annoying UI is...
# compose
l
Hi there, I'm having very weird and annoying UI issues with Compose running on Huawei devices, when I'm using an AndroidView to display a map. For example I have a MapView taking the whole screen and I have some Composable on top (It could be a pager or topAppBar ...). And strangely it either never draws the Composable on top of the map or make it disappears for no reason (And strangely, when the app is on landscape mode it's showing. But never on portrait mode). It's working fine on emulator or even on my pixel 3. I created a sample demo app (repository here) to demonstrate the issue. Any idea what's going on ?
👀 2
And here it's how it looks on the app I'm developing. It's just unusable because of all the UI bugs it's causing.
And it's working fine on my Pixel 3. I also asked some of my friends with Samsung or Pixels devices and it's also fine
m
Have you tried replacing the MapBox
MapView
with anything else, like a
SurfaceView
or
TextureView
? IOW, is the problem specific to MapBox, or is it more a problem with something that MapBox uses?
l
I tested with
View
,
TextView
and Google
MapView
and it seems fine. Not sure to understand why this would specific to MapBox with android on Huawei devices. This is quite an odd combo
Created an issue here: https://issuetracker.google.com/issues/187853241. It seems the issue is never there when the app is running on landscape mode (I tested on my app too)
h
This indeed looks like the same problem as discussed in https://kotlinlang.slack.com/archives/CJLTWPH7S/p1620718973338500. On my tests the issue happens also on landscape mode on some emulator configurations, but I have not managed to pinpoint the needed conditions.
Apparently this is still broken with beta7.
l
Same for me 😞
h
@Lucien Guimaraes some workarounds now available and maybe a fix as well: https://issuetracker.google.com/issues/187853241#comment3
💯 1
l
Indeed
setWillNotDraw(false)
is also working for me! Thank you 👍
🙇 1