如何改变Android的状态栏的背景颜色 [英] How to change the background color of android status bar
问题描述
我想通过编写一个应用程序更改状态栏的背景色。我的Android设备有黑色,我想将其更改为其他颜色。我在这里看到,与之相关的一些职位,但都讲述通知的背景。
I want to change the background color of status bar by writing an application. My android device has black color, i want to change it to some other color. I saw here, some posts related to it but all are telling about notification background.
如果任何机构知道这个,请帮助我。
If any body know about this please help me.
默认状态栏
使用可绘制作为背景,状态栏后
After using a drawable as background to status bar
推荐答案
对不起,除非你是一个定制ROM,这是不可能的,除非你只想状态栏更改为你的应用程序。
Sorry, unless you are making a custom ROM this isn't possible, unless you only want the status bar changed for your app.
这将需要大量的工作赫克。
This would require a heck of a lot of work.
首先,您需要Theme.NoTitleBar.Fullscreen添加到您的清单
First you will need to add Theme.NoTitleBar.Fullscreen to your manifest
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
>
然后,一旦你这样做,你需要创建一个重新presents状态栏标准布局,这将意味着,你必须添加的时间,同时也接收来自其他应用程序的所有通知,我不本人知道该怎么做,但我敢肯定有一种方法。
Then once you have done that you need to create a standard layout which represents the status bar, this would mean that you have to add the time, and also receive all the notifications from other apps, I do not personally know how to do that but I'm sure there is a way.
如果你真的想做到这一点好运,你有你很难提前。
If you really want to do this goodluck, you have a hard time ahead of you.
对不起,除非你有诀窍构建自定义光盘的,我不认为这是可能的。
Sorry, unless you have the know how of building custom ROMS I do not think this is possible
这篇关于如何改变Android的状态栏的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!