Add link to explain hexadecimal ARGB values

This commit is contained in:
Travis Dahl 2018-08-31 17:51:35 -07:00 committed by GitHub
parent 5b77cae78c
commit 9b5baa2cf9
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 33% 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 ```js
if (cordova.platformId == 'android') { if (cordova.platformId == 'android') {
StatusBar.overlaysWebView(true); StatusBar.overlaysWebView(true);