Create a flexible XML file to create a form with a gradient background.
textview_background.xml:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <gradient android:startColor="#333" android:centerColor="#000" android:endColor="#676" android:angle="270"/> <stroke android:width="2dp" android:color="#80808080"/> </shape>
save in your directory with a choice and call
android:background="@drawable/textview_background"
in your layout for the background of what you want to use. Text view, layout, button ...
This should give you something close to what you are looking for, I think.
The colors used in the gradient are a triple hex, I think you can use a regular hex.
Wayner Mar 07 '11 at 1:18 2011-03-07 01:18
source share