ryan ryan - 1 year ago 88
Android Question

How to change background color in android app

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

Answer Source

You need to use the android:background property , eg


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

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

Edit : 18th Nov 2012

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.

Eg :

enter image description here

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download