Skip to content

New Android version 15 does not support overlay: true ! #2350

Closed as not planned

Description

@Bader-Idris

Bug Report

Plugin(s)

"@capacitor/status-bar": "^7.0.1",

Capacitor Version

💊   Capacitor Doctor  💊 

Latest Dependencies:

  @capacitor/cli: 7.2.0
  @capacitor/core: 7.2.0
  @capacitor/android: 7.2.0
  @capacitor/ios: 7.2.0

Installed Dependencies:

  @capacitor/cli: 7.2.0
  @capacitor/android: 7.2.0
  @capacitor/ios: 7.2.0
  @capacitor/core: 7.2.0

[success] Android looking great! 👌

Platform(s)

  • Android

Current Behavior

My Android 15 os device is having trouble with @capacitor/status-bar package, I use this setting to show the bottom status bar, but it does not work, and it causes some calculations of CSS to be wrongly rendered due to using percentage values!

StatusBar.setOverlaysWebView({ overlay: true })

The current issue is with this mobile:

Redmi note 13 pro

Android version 15
Os version 2.0.4.0.VNFMIXM

Image


Expected Behavior

expected behavior with an older version of os and another mobile

Oppo a92
Model cph2059

CPU: Snapdragon 665

Android version 11

Image

Activity

  1. Ionitron commented on Apr 29, 2025

    @Ionitron
    Collaborator

    This issue needs more information before it can be addressed.
    In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
    If no sample app is provided within 15 days, the issue will be closed.

    Please see the Contributing Guide for how to create a Sample App.

    Thanks!
    Ionitron 💙

  2. Bader-Idris commented on Apr 30, 2025

    @Bader-Idris
    Author

    This issue needs more information before it can be addressed.
    In particular, the reporter needs to provide a minimal sample app that demonstrates the issue.
    If no sample app is provided within 15 days, the issue will be closed.

    Please see the Contributing Guide for how to create a Sample App.

    Thanks!
    Ionitron 💙

    You're too lazy, I gave you everything needed, and even the repo to install it and test it, even the mobile version, and you're saying a minimal sample app 🙄

  3. Mr-Rayman commented on May 19, 2025

    @Mr-Rayman

    I can confirm this behavior for my physical phone (Samsung Galaxy S23) with Android 15 as well as the Emulator in Android Studio with emulated Google Pixel with Android 16.

    The setting ("overlaysWebView": false) for the StatusBar Plugin doesn't have any effect. The entire app is shown fullscreen behind the Android top bar with notch, clock etc. blocking the underlying app controls.
    "@capacitor/status-bar": "^7.0.1"

    There are the remarks in the plugin API documentation: "For applications targeting Android 15, this property has no effect unless the property windowOptOutEdgeToEdgeEnforcement is added to the application layout file. Otherwise, the application assumes always overlays as true. "

    I guess this is a relevant aspect:

    windowOptOutEdgeToEdgeEnforcement - But if the window belongs to an app targeting BAKLAVA or above, this attribute is ignored and the enforcement is applied regardless.

    There are now several issues refering to problems with the StatusBar Plugin with Android 15+.
    #2341
    #2336

  4. avinzheng commented on May 22, 2025

    @avinzheng

    The overlaysWebView api has bug on Android 15 (Edge to Edge display), Capacitor official documentation has already explained as below:

    Whether the statusbar is overlaid or not. For applications targeting Android 15, this property has no effect unless the property windowOptOutEdgeToEdgeEnforcement is added to the application layout file. Otherwise, the application assumes always overlays as true. More details in https://developer.android.com/reference/android/R.attr#windowOptOutEdgeToEdgeEnforcement

    You can use @capawesome/capacitor-android-edge-to-edge-support plugin as a temporary fix.

    The best solution for configuring Status Bar and Navigation Bar is using the three plugins below:

  5. Mr-Rayman commented on May 23, 2025

    @Mr-Rayman

    This is the solution that works for me (in emulator and real phone). Unfortunately the Capacitor Plugins documentation is not that specific on this part.

    Modify this file:
    app/res/values/styles.xml

    Append this line in every style section with Theme.AppCompat.*
    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

    This is what it looks like for my Capacitor installation:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    
        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
        <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
            <item name="windowActionBar">false</item>
            <item name="windowNoTitle">true</item>
            <item name="android:background">@null</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
    
        <style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
            <item name="android:background">@drawable/splash</item>
        </style>
    </resources>
    
  6. BigPackie commented on Oct 22, 2025

    @BigPackie

    This is the solution that works for me (in emulator and real phone). Unfortunately the Capacitor Plugins documentation is not that specific on this part.

    Modify this file: app/res/values/styles.xml

    Append this line in every style section with Theme.AppCompat.* <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

    This is what it looks like for my Capacitor installation:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    
        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
        <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
            <item name="windowActionBar">false</item>
            <item name="windowNoTitle">true</item>
            <item name="android:background">@null</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
    
        <style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
            <item name="android:background">@drawable/splash</item>
        </style>
    </resources>
    

    To complete your solution, I still needed to add overlaysWebView: false for the plugin config in capacitor.config.ts. After this everything worked exactly in our app as with Capacitor 6

    plugins: {
        StatusBar: {
          overlaysWebView: false,
        },
      },
    
  7. GuidoGagliardini commented on Dec 16, 2025

    @GuidoGagliardini

    Here’s the workaround that fixed Status Bar overlap for me on Ionic 3 + Capacitor 7

    Context
    Stack: Ionic 3 (ionic-angular 3.9.x) with Capacitor 7.
    Symptom: On Android 12/13/14 the header/navbar rendered under the system status bar.
    Root cause
    Ionic 3 doesn’t automatically apply status bar padding when running on Capacitor 7. You need to enable it explicitly via Ionic’s Config.
    What I changed

    1. Enable Ionic’s status bar padding in app.component.ts
    import { Component } from '@angular/core';
    import { Platform, AlertController, Events, ToastController, Config } from 'ionic-angular';
    import { StatusBar, Style } from '@capacitor/status-bar';
    
    @Component({ templateUrl: 'app.html' })
    export class MyApp {
      constructor(
        public platform: Platform,
        public config: Config,
        public alertCtrl: AlertController,
        public toast: ToastController,
        public events: Events
      ) {
        platform.ready().then(() => {
          // Key line: make Ionic 3 add the correct top padding for the status bar
          this.config.set('statusbarPadding', true);
    
          // Usual Capacitor StatusBar config
          StatusBar.setStyle({ style: Style.Light });
          StatusBar.setBackgroundColor({ color: '#1e3a8a' });
          StatusBar.setOverlaysWebView({ overlay: false });
        });
      }
    }
    
  8. Bader-Idris commented on Feb 26, 2026

    @Bader-Idris
    Author

    This is the solution that works for me (in emulator and real phone). Unfortunately the Capacitor Plugins documentation is not that specific on this part.

    Modify this file:
    app/res/values/styles.xml

    Append this line in every style section with Theme.AppCompat.*
    <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>

    This is what it looks like for my Capacitor installation:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    
        <!-- Base application theme. -->
        <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
            <!-- Customize your theme here. -->
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
        <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
            <item name="windowActionBar">false</item>
            <item name="windowNoTitle">true</item>
            <item name="android:background">@null</item>
            <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
        </style>
    
    
        <style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
            <item name="android:background">@drawable/splash</item>
        </style>
    </resources>
    

    Have you tried their newer version, I see they didn't fix it yet

  9. Lumca commented on Mar 3, 2026

    @Lumca

    is there a possibility to have the app status bar filled to the edge with the app but if the user has nav bar enabled then, count that in and scale the app to be above the nav bar? I just seem to be able to make edge to edge, where the nav bar is over the app or it is above the nav bar but there is status bar with solid color..

  10. jcesarmobile commented on Mar 24, 2026

    @jcesarmobile
    Member

    Since Android 15 apps are edge to edge, meaning the WebView is full screen and both the status bar and navigation/gesture bars are both overlayed over the WebView, so this issue doesn't make much sense.

    In Capacitor 8 there have been several improvements for handing edge to edge, make sure you update.

  11. locked as too heated and limited conversation to collaborators on Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions