You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by urmx <gi...@git.apache.org> on 2017/04/21 12:02:58 UTC
[GitHub] cordova-plugin-statusbar pull request #78: CB-11858: (android) Add StatusBar...
GitHub user urmx opened a pull request:
https://github.com/apache/cordova-plugin-statusbar/pull/78
CB-11858: (android) Add StatusBarStyle feature support for Android M+
### Platforms affected
Android 6.0+ (API level 23+)
### What does this PR do?
This PR add StatusBarStyle feature support for Android 6.0+ (Marshmallow, API level 23+).
The existing "StatusBarStyle" preference is used, and according to the README.md, the possible case-insensitive values are:
- __default__: dark content (for light backgrounds)
- __lightcontent__: light content (for dark backgrounds)
- __blacktranslucent__: light content (for dark backgrounds)
- __blackopaque__: light content (for dark backgrounds)
This value can also be changed with the existing javascript functions:
- `StatusBar.styleDefault()`
- `StatusBar.styleLightContent()`
- `StatusBar.styleBlackTranslucent()`
- `StatusBar.styleBlackOpaque()`
The default value is "__lightcontent__" as specified in the README (thus backward compatible with the previous style).
### What testing has been done on this change?
- Default value (no StatusBarStyle parameter in config.xml) in a Cordova project on a Xperia Z3 Android 6.0.1
- The four StatusBarStyle values (lower and mixed cases) in config.xml in a Cordova project on a Xperia Z3 Android 6.0.1
- An invalid value "foo" in config.xml in a Cordova project on a Xperia Z3 Android 6.0.1
- The four StatusBar.style* methods in Chrome Remote Debugger on a Xperia Z3 Android 6.0.1
- Travis CI on this branch
### Checklist
- [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
- [x] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
- [ ] Added automated test coverage as appropriate for this change.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/urmx/cordova-plugin-statusbar CB-11858
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-plugin-statusbar/pull/78.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #78
----
commit dd879140c42fa09c4274a76b9693be16e7f24f2a
Author: Max Ruman <rm...@zanvio.com>
Date: 2017-04-21T10:55:58Z
CB-11858: (android) Add StatusBarStyle feature support for Android M+
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
Excellent, thanks for signing the ICLA!
Ping @hollyschinsky - can you check what @urmx and @tobiasviehweger mention here with respect to the blacktranslucent/blackopaque bits mentioned in your blog post?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by tobiasviehweger <gi...@git.apache.org>.
Github user tobiasviehweger commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@filmaj I did, actually.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by urmx <gi...@git.apache.org>.
Github user urmx commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@filmaj Yes, I also did 3 days ago.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by tobiasviehweger <gi...@git.apache.org>.
Github user tobiasviehweger commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@filmaj @urmx We probably should also check about the blacktranslucent one. It seems we implemented that differently, but I din't quite remember why.. Also we have other defaults (default vs. lightcontent). I remember changing that to unify the behaviour across iOS and Android. @urmx Any thoughts?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar pull request #78: CB-11858: (android) Add StatusBar...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/cordova-plugin-statusbar/pull/78
---
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by urmx <gi...@git.apache.org>.
Github user urmx commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@tobiasviehweger For the blacktranslucent behavior, I used this [plugin README](https://github.com/apache/cordova-plugin-statusbar/blob/master/README.md#statusbarstyleblacktranslucent):
> Use the blackTranslucent statusbar (light text, for dark backgrounds).
And I also had a look on [Apple Developer](https://developer.apple.com/reference/uikit/uibarstyle) about [blackTranslucent](https://developer.apple.com/reference/uikit/uibarstyle/1623394-blacktranslucent):
> Deprecated. Use black and set the isTranslucent property to true instead.
So it's the same as [black](https://developer.apple.com/reference/uikit/uibarstyle/1623396-black):
> Use a black background with light content.
And now both blackTranslucent and blackOpaque seem both deprecated in [UIStatusBarStyle](https://developer.apple.com/reference/uikit/uistatusbarstyle) (as you mentioned in your PR).
However, the [devgirl blog](http://devgirl.org/2014/07/31/phonegap-developers-guid/) you used as a reference state the opposite:
> The default and blacktranslucent values display black foreground text and icons.
> The lightcontent and blackopaque values display white foreground text and icons.
So if she's right, we also have to change this plugin README.
And for the default value in Android, I used lightContent (white on black) because it's backward compatible with the current style (white status bar text).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by markv <gi...@git.apache.org>.
Github user markv commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@filmaj @urmx @tobiasviehweger can we get this PR merged? Thanks
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
What happens when we test this on Android versions earlier than Android M? We currently support every Android version higher than API 19, so if we could get some more testing on this, that would be greatly appreciated.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
BTW: I'm going to go with this one since it merges more cleanly. I'm going to close #64
---
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
Cordova CI Build has completed successfully.
**Commit** - [Link](https://github.com/apache/cordova-plugin-statusbar/pull/78/commits/dd879140c42fa09c4274a76b9693be16e7f24f2a)
**Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-statusbar-pr/46/)
24 tests run, 0 skipped, 0 failed.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by tobiasviehweger <gi...@git.apache.org>.
Github user tobiasviehweger commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
Just fyi, I also did some things a long time ago in #64. Nothing did happen to it though....
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
Cool, so we can fall back on your PR should @urmx be unable to. What about you, @urmx ?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by hollyschinsky <gi...@git.apache.org>.
Github user hollyschinsky commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
@filmaj @urmx @tobiasviehweger It's a bit confusing with iOS because the status bar styling has changed several times and the `blacktranslucent` and `blackopaque` were deprecated in iOS7.
My blog post was correct at the time but since the deprecation, the code in the StatusBar plugin has been updated. If you look at these methods now, those two deprecated styles are [only specifically applied when the version is pre 7](https://github.com/apache/cordova-plugin-statusbar/blob/master/src/ios/CDVStatusBar.m#L311-329). Otherwise that code will set it to the `UIStatusBarStyleLightContent` style - which is light foreground color (white text). This is the recommended setting [based on the apple docs](https://developer.apple.com/reference/uikit/uistatusbarstyle?language=objc) for those deprecated values.
Also, make note that the `lightcontent` style preference is [automatically added to the platform config.xml](https://github.com/apache/cordova-plugin-statusbar/blob/master/plugin.xml#L59-L66) when you add the StatusBar plugin for iOS. So unless the developer specifically sets something else for that it in the root project config.xml, that is going to be what is set by default (not to be confused with the `default` style setting itself which is the opposite and dark foreground color (black text) for light backgrounds :/).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-plugin-statusbar issue #78: CB-11858: (android) Add StatusBarStyle f...
Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:
https://github.com/apache/cordova-plugin-statusbar/pull/78
Two PRs for the same feature, wow! Thanks you two.
Have either of you signed an ICLA?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org