Hi I'm new to Android Studio, how can I fix my emulator? because my composables are overlapping the default Top App bar of the emulator itself. Thanks in advance
c
Chris Sinco [G]
04/29/2024, 3:35 PM
Not sure that’s an emulator issue. Your UI is going edge to edge. I would use the Layout Inspector to debug further. I would also check what modifiers you are setting.
❤️ 1
s
Sulav Timsina
04/30/2024, 6:34 PM
@John Ace Magno Are you seeing different behavior in physical device?
c
Colton Idle
05/01/2024, 12:51 PM
In your root layout (column most likely) add a modifier of
Modifier.statusBarsPadding()
and see if that fixes it. If so, then yes like Chris said. Your ui is edge to edge. up to you to handle insets. might be "annoying" at first if you're just getting started, but if you use something like a topAppBar/toolbar/whatever at the top then it'll take care of this for you. and it allows you to create more immersive UIs when you want to put a hero image at the top of your app.
edge to edge is the future and is enabled by default in Android 15 apparently.