shape.xml:

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
	android:shape="rectangle">
	<gradient android:startColor="#FF123456" android:endColor="#FF654321"
		android:angle="270" />
</shape>

style.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
	<style name="NewTheme" parent="android:Theme">
		<item name="android:background">@drawable/shape</item>
	</style>
</resources>


配置文件:

<activity android:name=".translucent" android:label="@string/app_name"
   android:theme="@style/NewTheme">