如何更改codenameone android应用程序中状态栏的颜色? [英] How to change the color of the status bar in a codenameone android app?

查看:115
本文介绍了如何更改codenameone android应用程序中状态栏的颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想更改状态栏的颜色以匹配我的应用背景,我该怎么做?

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

推荐答案

可以将colors.xml文件放在CN1项目< project> / native / android 目录下,并附带以下示例内容:

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>

在这种情况下,colorPrimaryDark是您想要为状态栏着色的颜色

Where in this case the colorPrimaryDark is the color you would like to color the status bar

这篇关于如何更改codenameone android应用程序中状态栏的颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆