如何改变在Android应用程序背景颜色

问题描述:

我希望能够改变背景颜色为白色在我的Andr​​oid应用程序在可能的最简单的方法。

I want to be able to change the background color to white in my android app in the simplest way possible.

您需要使用android:background属性,如:

You need to use the android:background property , eg

android:background="@color/white"

另外,你需要为白中的strings.xml添加值

Also you need to add a value for white in the strings.xml

<color name="white">#FFFFFF</color>

编辑:二零一二年十一月一十八日

Edit : 18th Nov 2012

的8个字母的颜色code中的前两个字母提供alpha值,如果您使用的是HTML 6字母色彩符号的颜色是不透明的。

The first two letters of an 8 letter color code provide the alpha value, if you are using the html 6 letter color notation the color is opaque.

例如: