Has anyone crossed into this kind of error? Appare...
# compose-android
l
Has anyone crossed into this kind of error? Apparently the rendering is not working properly for a Compose App on API < 29. Any clues? I don't know if it's an emulator thing, I don't have a Physical Device with that API version 🧵.
Screen Recording 2024-10-09 at 7.46.34 PM.mov
r
Looks like underdraw, and you’re missing a background somewhere
l
Yeah, the background is not a big issue. By underdraw, you're referring to the components when moving they're left on the screen?
note that the only thing I'm doing is opening the keyboard, and when it's closed, the content is like replicated over the screen
r
Yeah that’s caused by underdraw
Your app is not drawing in that area, usually because there’s nobackground on the window/in the layouts
l
I see. Is there a reason why this happens in api < 29?
Added this to the 'main' container of the app, and it seems that is fixed
Copy code
.background(LocalColorScheme.current.bgApp)
but It wasn't necessary on API 29 and above
r
Without knowing what else you do in your app it’s hard to answer. Activities always have a background by default
l
It's just a NavHost inside an activity. And you can navigate between screens. I can provide more details. Probably the theme of the activity is missing a background?
s
I saw someone complaining about a similar issue, and it turned out that "android:hardwareAccelerated=true" had been added to the Manifest.
r
That shouldn't matter, hw acceleration is on by default
s
I know, it caught me by surprise as well.
l
I think that a drawing behavior changed from api 29. In any case, thanks for the help!
s
I’m not seeing anything like that on any of the supported APIs. 🤔
l
Me neither, it's just a theory that came to my mind. I've tested both physical and emulator devices from api 30 onwards, and that modifier wasn't necessary