tags:

views:

134

answers:

2

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

+1  A: 

You need to use the android:background property , eg

android:background="@color/white"

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

<color name="white">#FFFFFF</color>
Ravi Vyas
ryan please see my edited answer , this works
Ravi Vyas
thank you it works now
ryan
A: 

You can also use

android:background="#ffffff"

in your xml layout, or you can change the theme in your AndroidManifest.xml by adding

android:theme="@android:style/Theme.Light"

to your activity tag.

If you want to change the background dynamically, use

YourView.setBackgroundColor(Color.argb(255, 255, 255, 255));
James