How do I change the background color of an XML file?
Answer
Take your outer layout (e.g. a LinearLayout ) and set its background attribute to a color. These colors can be defined in the res/values/colors. xml file (see here how to do this). You can also define a color directly at the attribute (
android:background=”#ffff0000″ ), but that’s usually not good.
Answer
Take your outer layout (e.g. a LinearLayout ) and set its background attribute to a color. These colors can be defined in the res/values/colors. xml file (see here how to do this). You can also define a color directly at the attribute (
android:background=”#ffff0000″ ), but that’s usually not good.