Closed Papasmurfo closed 10 years ago
The StatusBarBackgroundColor
and StatusBarOverlaysWebView
preference tags are not yet supported by PhoneGap Build (in the readme).
Try this instead:
function deviceReady() {
StatusBar.backgroundColorByHexString("#4e9fd5");
}
document.addEventListener('deviceready', deviceReady, false);
Thanks will give it a try!
On Friday, March 21, 2014, Ryan Willoughby notifications@github.com wrote:
The StatusBarBackgroundColor and StatusBarOverlaysWebView preference tags are not yet supported by PhoneGap Build (in the readmehttps://github.com/phonegap-build/StatusBarPlugin#preferences ).
Try this instead:
function deviceReady() { StatusBar.backgroundColorByHexString("#4e9fd5"); } document.addEventListener('deviceready', deviceReady, false);
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38312316 .
This code makes the background of the status bar 'black' with black text.
Is there any other code that could be a work around?
Thanks again for the help,
Jonathan
When it will be supported by Phonegap build?
@Papasmurfo What are you trying to achieve? If you want black with white text, check the docs:
StatusBar.backgroundColorByHexString("#4e9fd5");
StatusBar.styleLightContent();
@Igos not entirely sure -- its on the backlog but not a priority, since you can easily work around it by setting these values via javascript instead.
Hi Ryan,
I tried the code that you supplied but the background colour doesn't work, but it does "kind" of work as it changes the background to black? With black text?
Any help is greatly appreciated,
Jonathan
On Friday, March 28, 2014, Ryan Willoughby notifications@github.com wrote:
@Papasmurfo https://github.com/Papasmurfo What are you trying to achieve? If you want black with white text, check the docshttps://github.com/phonegap-build/StatusBarPlugin/blob/master/README.md :
StatusBar.backgroundColorByHexString("#4e9fd5"); StatusBar.styleLightContent();
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38964619 .
@Papasmurfo did you try:
StatusBar.styleLightContent();
Yes - copy and pasted the code you supplied before. I think it was wrapped in a function.
Thanks again,
Jonathan
On Friday, March 28, 2014, Ryan Willoughby notifications@github.com wrote:
@Papasmurfo https://github.com/Papasmurfo did you try StatusBar.styleLightContent();
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38964927 .
Is this on PhoneGap Build? Can you share your App ID?
Yes, would you be able to supply your email so I can throw you the whole JS file and then we can post the resolution here.
Jonathan
On Friday, March 28, 2014, Ryan Willoughby notifications@github.com wrote:
Is this on PhoneGap Build? Can you share your App ID?
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38965150 .
Please send it to build at phonegap.com
Ah - I'll just post the code here but essentially in my main.js file I have the following.
function deviceReady() { StatusBar.backgroundColorByHexString("#4e9fd5"); } document.addEventListener('deviceready', deviceReady, false);
This seems to create a black bar with black text for some reason.
On Friday, March 28, 2014, Ryan Willoughby notifications@github.com<javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
Please send it to build at phonegap.com
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38965413 .
I can't really do much with that without seeing the context. Please send me your PhoneGap Build app ID to build at phonegap.com.
Will do Ryan. Thanks again for helping our with this one.
Best,
Jonathan
On Friday, March 28, 2014, Ryan Willoughby notifications@github.com wrote:
I can't really do much with that without seeing the context. Please send me your PhoneGap Build app ID to build at phonegap.com.
Reply to this email directly or view it on GitHubhttps://github.com/phonegap-build/StatusBarPlugin/issues/26#issuecomment-38966147 .
@Papasmurfo haven't heard from you, closing this issue. Let me know if I missed an email.
@wildabeast I can replicate @Papasmurfo's bug on Phonegap build. Here's my build: https://build.phonegap.com/apps/951372/builds
I am trying to call StatusBar.backgroundColorByHexString("#FFFFFF");
but instead I get a black statusbar with black text.
As far as I can tell, StatusBar
is never defined -- if I use Phonegap Build's debug view I get ReferenceError: Can't find variable: StatusBar
I was able to fix this by switching to version 1.0.1 of the plugin. Using the earlier version, I can now access the StatusBar JS object, and set the background color to white.
Yeah, I have the same issue. StatusBar is undefined in the global scope for javascript in the latest. Had to revert to 1.0.1
Is this not working with Phonegap build?
Currently trying to change my status bar colour, with the following code:
Is there any specific order I should be putting these in or in certain places?
Thanks for the plugin! Any help is greatly appreciated,
Jonathan