I would like to change the color of the status bar to match my app background, how can I do this?
Asked
Active
Viewed 650 times
1 Answers
8
It is possible by placing a colors.xml file under the CN1 project <project>/native/android
directory with the following example content:
<resources>
<color name="colorPrimary">#ffffc003</color>
<color name="colorPrimaryDark">#ffffc003</color>
<color name="colorAccent">#ff009486</color>
</resources>
Where in this case the colorPrimaryDark is the color you would like to color the status bar

Chen
- 3,760
- 1
- 17
- 21
-
That's a highly useful information you shared. Thanks – Diamond Jan 20 '16 at 16:05
-
1The last 6 digits is the actual color code and not the first 6. If I want my statusbar to have red `ff0000` background, the code should be `#ffff0000` and not `ff000003` – Diamond Jan 20 '16 at 17:29
-
right, the first 2 digits is the alpha value of the color – Chen Jan 20 '16 at 18:00
-
1`
#ffffffff ` can also be added to set the color of the text in the status bar – netsuite_insights Feb 03 '16 at 00:18 -
great.. colorPrimaryDark is for status bar and what are colorPrimary & colorAccent for? – beck Aug 01 '17 at 10:47