I would like to put a gradient on the bottom layout, but it seems to work only with the top layout.
Here is the code of the main layout (test.xml) :
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFF">
<RelativeLayout android:id="@+id/relativeLayout1" android:layout_alignParentTop="true" android:layout_height="60sp" android:layout_width="fill_parent" android:background="@drawable/tool_bar_gradient"></RelativeLayout>
<RelativeLayout android:id="@+id/relativeLayout2" android:layout_alignParentBottom="true" android:layout_height="60sp" android:layout_width="fill_parent" android:background="@drawable/tool_bar_gradient"></RelativeLayout>
</RelativeLayout>
The code of the gradient (tool_bar_gradient) :
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient xmlns:android="http://schemas.android.com/apk/res/android" android:startColor="#257aa1" android:endColor="#6fb7d9" android:angle="90" android:bottom="450sp">
</gradient>
</shape>
The result : the gradient is effective on the top bar, but not on the bottom bar…
What is wrong ?
PS : The target is Android 2.1-update1 or Android 2.2.
I am getting this
screen i am getting
is anything that you didn’t get it