-
Notifications
You must be signed in to change notification settings - Fork 598
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatusBar.setOverlaysWebView({ overlay: true })
alongside SplashScreen glitches on Android API 33 (Android 13)
#1160
Comments
This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue. Please see the Contributing Guide for how to create a Code Reproduction. Thanks! |
Code Repro has been updated from a list of steps to an example repo |
@jbouchard24 I've got the same issue and this fix seems to work in this case. This part in particular: MainActivity.kt: import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
class MainActivity : BridgeActivity() {
public override fun onCreate(savedInstanceState: Bundle?) {
registerPlugins(
// ...
)
super.onCreate(savedInstanceState)
// This line fixes the issue:
val splashScreen = installSplashScreen()
}
} |
@nikitalpopov Thanks for the reply, but it's not working in my project. I have been suggested to make changes to the status bar in a
|
Yes after a ton of googling and whatnot this is what i've had to resort to aswell, my issue was with StatusBar.setBackgroundColor not setting the correct statusbar color on app launch (the statusbar background is supposed to be white or black depending on whether the user last chose dark or light theme for the app, and when the user toggles themes in the app the statusbar background color changes between white and black just fine), putting a settimeout to occur 250ms after the splashscreen is hidden did the trick, feels a bit hacky and i was still looking for a proper fix but it doesn't look like there is one so this will have to do. |
Still an issue for me with version 5.0.6 |
tested on ionic/vue very clean
with capacitor.config.ts
|
Still an issue for me with version 5.0.6, react/ionic - I tried all proposed approach above? it did not work with my project. Has anyone solved this issue? please give me a hint to overcome it or when this issue will be fixed. Thank you! |
Using Angular here, best solution I found is to set splashscreen duration to some reasonable time:
and in my app.component.ts:
it works every time. And it is better than doing it with this approach:
,because this way you will have blank white screen for short amount of time between splashscreen and app home screen. |
thank you so much!! |
The issue still does exist, all methods of The following solution is working for me: capacitor.config.ts
Call any methods of
I am using `"@capacitor/status-bar": "^5.0.6", |
Just FYI the issue still exists on |
The issue still exists. Currently, the only solution is to use setTimeout. I am using "@capacitor/status-bar": "^5.0.8". |
Same issue, struggled to get the Splashscreen only to deal with this :) |
Bug Report
Plugin(s)
Capacitor Version
Platform(s)
Current Behavior
I have an app that uses the
StatusBar.setOverlaysWebView({ overlay: true })
feature from the StatusBar plugin, alongside the SplashScreen plugin. When opening the app on Android API 33 (Android 13) from home screen or app drawer, the status bar is opaque and the webview stretches underneath the navigation/gesture bar. That is not the case on Android API 31 (Android 12) or earlier, or when opening the app from settings > Apps or long-pressing the app icon > App Info > Open. (See Additional context for more info)Current behavior on Android API 33 (Android 13):
Expected Behavior
I expect a behavior like Android API 31 (Android 12) and earlier, where the app is using the space underneath a transparent status bar and the bottom doesn't stretch past the gesture bar when calling
StatusBar.setOverlaysWebView({ overlay: true })
:Code Reproduction
Example repo
Additional Context
Here some of the tests I made. Hopefully it helps isolate the issue.
Working: ✅
Not working: ❌
The text was updated successfully, but these errors were encountered: