Skip to content Skip to sidebar Skip to footer

How To Change The Color Of The Status Bar In A Codenameone Android App?

I would like to change the color of the status bar to match my app background, how can I do this?

Solution 1:

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


Post a Comment for "How To Change The Color Of The Status Bar In A Codenameone Android App?"