In list_view_item
, add a dummy View after your RelativeLayout
and wrap them all at vertical LinearLayout
like this:
<LinearLayout
android:orientation="vertical">
<RelativeLayout>
...
...
</RelativeLayout>
<View
android:id="@+id/shadow"
android:layout_width="fill_parent"
android:layout_height="3dp" <!--or your needed height value-->
android:background="@drawable/shadow_drawable">
</View>
</LinearLayout>
and at drawable folder add the new shadow_drawable.xml and put this at it
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android=”http://schemas.android.com/apk/res/android”>
<gradient
android:startColor="@color/#000000" <!--black-->
android:endColor="@color/#FFFFFF" <!--white-->
android:angle="90" <!-- angle of the gradient-->
>
</gradient>
</shape>