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 the windowOptOutEdgeToEdgeEnforcement attribute to your application or activity's theme in your app manifest file:

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

    However, this will be deprecated/removed in future versions and you will have to handle it anyway. I suggest you look at the Handle edge-to-edge enforcements in Android 15 Codelab.

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