开发者

Default status bar text color in android

Is there a default style reference or something I can use for my custom status bar text color that makes it work properly on different versions of android / phones.

For example on the Samsung Galaxy S White works well, but on the nexus one white is u开发者_运维百科nreadable but black works best, and vice versa.


There are a couple different ways you could go about this. Before you jump in to modifying standard widgets, I would ask yourself if you really need to do it. Let me explain.

Each phone manufacturer has the option of creating their own widgets, themes, and images that sort-of overwrite the standard resources provided with Android within Google's published set of rules. A lot of applications on the market use the base themes, widgets, and images that are part of the Android OS. So your application may appear differently between phones even though you used the same resource files. This is because the phone manufacturer replaced these resources or choose to change the defaults.

Generally speaking using default resources won't give you problems visually. If you use a light theme, then a dark color text is applied automatically and vice versa. I will qualify that by saying I have seen a user on stack overflow that did have a theme problem with one particular phone.

In the example you gave, it is possible that the difference you see visually is simply a difference in theme, light theme vs. dark theme. If you don't specify a theme, your theme gets applied based on what the manufacturer chose as the default theme.

So, how do you go about solving this problem? The answer is to choose to apply your own themes, widgets and images in place of the standard resource set that is provided with Android. This way you can achieve (almost) the exact same look across different phones.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜