The xml would go like this :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
<LinearLayout
    android:id="@+id/headerLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
 
    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:background="@drawable/headerImage"
        android:orientation="vertical" />
 
    <View
        android:layout_width="fill_parent"
        android:layout_height="5dip"
        android:background="@drawable/drop_shadow" >
    </View>
</LinearLayout>
...
cs



drop_shadow.xml :


1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">    
    <gradient
        android:startColor="#404040"
        android:endColor="#F1F1F1"
        android:angle="270"
        >
    </gradient>
</shape>
cs



https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android

https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android

https://stackoverflow.com/questions/14463747/simple-layout-shadow-in-android

+ Recent posts