-
Notifications
You must be signed in to change notification settings - Fork 481
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
Plugin not working on Android 9 #155
Comments
If you want the status bar overlayed, then I would just use Also, using Note that right now, you must use the JS api |
I tried without setting So, we wait for fix or ? |
I need to make a correction.
I'm wrong about this, they will not conflict. You can have a status bar in an overlay state, and still set a background color to it. Below should be all you need to set the statusbar to overlay mode. It will make the status bar transparent, and your webview will appear underneath the status bar (so document.addEventListener('deviceready', () => {
StatusBar.overlaysWebView(true);
StatusBar.backgroundColorByHexString('#33000000');
}); This was tested on my android 9 device, if it doesn't work for you, then please provide a sample reproduction app. Learn more about creating a reproduction app at https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md |
padding-top did not resolve my issue.
After clicking OK: Something wierd is happening |
Please provide a sample reproduction app, then I can take a look at it. https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md |
Playing around with your app, I did find some weird behaviour... If Additionally, if I omit the Lastly if I do: setTimeout(() => {
StatusBar.overlaysWebView(true);
}, 1000); in the This tells me there is some kind of asynchronous or race condition problem with the plugin. |
I'd say there are actually two problems. First is the one I described above. The second is |
Because two issues isn't really related I've created two new issues, specifically for issues I found, #158 & #159. That way both issues can be tracked or worked on independently. You're welcome subscribe to the new issues. In the meantime, there are two workarounds that I can foresee: The first one as I already stated it, wrap the So I'd suggest another workaround: I would fork this statusbar plugin, and apply the #142 PR to your fork. This will fix the Let me know if any of these workarounds work for you |
Thanks for checking out my problem! I would like to use that solution while plugin will be fixed. I have commited my changes. Please check it out. |
I did change some stuff in your repo during my experimentation. I pushed my changes in a new branch on your repo. |
@breautek thanks, but simply now I'm trying to make that status bar transparent without any color..
I did not set any background color. Check updated repo please.. and thank you, really! |
Okay I've found that using this structure works StatusBar.overlaysWebView(false);
setTimeout(() =>
{
StatusBar.overlaysWebView(true)
setTimeout(() =>
{
StatusBar.backgroundColorByHexString('#22200000')
}, 100)
}, 100) Kind of stinky but it's the only way to making it work 😂 Hope this helps |
I'm trying to fix issue with StatusBarOverlaysWebView, but it's not working on Android 9.
How it looks like on Android 9: https://ibb.co/BZ4KVpB
How it looks like on PhoneGap Developer Application: https://ibb.co/W5574HC
I tried every possible combination editing config.xml. Now my config.xml look like this:
I run plugin with JS and it gives me normally object of StatusBar:
Is there any trick about this?
The text was updated successfully, but these errors were encountered: