Merge pull request #100 from travisdahl/patch-1

More detailed explanation on how to implement a partially transparent statusbar on Android
This commit is contained in:
Gearóid 2018-09-07 14:11:18 +09:00 committed by GitHub
commit 23944d11f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,9 @@ if (cordova.platformId == 'android') {
}
```
It is also possible to make the status bar semi-transparent. For example, a black status bar with 20% opacity:
It is also possible to make the status bar semi-transparent. Android uses hexadecimal ARGB values, which are formatted as #AARRGGBB. That first pair of letters, the AA, represent the alpha channel. You must convert your decimal opacity values to a hexadecimal value. You can read more about it [here](https://stackoverflow.com/questions/5445085/understanding-colors-on-android-six-characters/11019879#11019879).
For example, a black status bar with 20% opacity:
```js
if (cordova.platformId == 'android') {
StatusBar.overlaysWebView(true);