Search code examples
androidandroid-15edge-to-edge

Android 15. Edge to edge mode hide a top View


I have a Pixel 6 device and updated today Android version to 15.

I test a simple activity for Android 15 and see that a part of top TextView is hiden.

I guess this is a bug of edge-to-edge mode.

How to disable this mode or fix this problem?

I tryed many ways to show system bar but it always invisible.

enter image description here


Solution

  • This is not a bug, it appears that you are still using Material 2 components you have to handle the insets yourself.

    You can temporarily add to your app theme

    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
    

    but this will be deprecated/removed in future versions and you will have to handle it anyway. I suggest you look at the code lab on how to handle edge to edge

    Updating to Material 3 components will help since components are made to handle edge to edge without the manual work