This code snippet shows how to create a Shape XML background for your screen. You could also use an image as a backgorund, but a Shape definition is more lightweight and probably scales to various device form-factors better.
In your resources -> drawable folder, create a New -> Shapes XML file.
Name the Shapes file, for example "bck_gradient" and then add the gradient XML tag and basic attributes.
Choose the gradient's start and end colors using hexadecimal notation. For example, blue (#0000FF) to yellow (#FFFF00).
The angle attribute indicates whether the gradient starts at the top, side, bottom, or other angle.
Note:
http://developer.android.com/guide/topics/resources/drawable-resource.html
The angle for the gradient in degrees must be a multiple of 45. Default is 0.
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="45"
android:startColor="#0000FF"
android:endColor="#FFFF00" />
</shape>
In your screen's Layout XML file, add this attribute to link the Shape XML to your screen's layout:
android:background="@drawable/bck_gradient"
Example: