How to change the color of the status bar in a codenameone android app?

雨燕双飞 提交于 2019-12-30 05:24:07

问题


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


回答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



来源:https://stackoverflow.com/questions/34904705/how-to-change-the-color-of-the-status-bar-in-a-codenameone-android-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!