Question

I am trying to get a shadow effect at the end of my ListView which is placed inside a DrawerLayout. I have a png image for the shadow effect. I just want to know how to place it. I tried creating a view and placing this image as a background image, but the wholw layout gets the shadow. My xml file is below and please guide me step by step what to do.

    <android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">


<FrameLayout
    android:id="@+id/content_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />




<ListView
    android:id="@+id/left_drawer"
    android:layout_width="240dp"
    android:visibility="visible"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:choiceMode="singleChoice"
    android:divider="@android:color/transparent"
    android:dividerHeight="0dp"
    android:background="@android:color/black"/>

<View
        android:id="@+id/vieworange"
        android:layout_width="10dp"
         android:layout_height="match_parent"

        android:background="@drawable/menushade"
        android:visibility="visible" />

Was it helpful?

Solution

You can add

 list.addFooterView(footerView);

and insert shadow image in footer view for details link!

OTHER TIPS

You just need to place that PNG shadow image as a background of your listview. i.e.

    <ListView
    android:id="@+id/listView1"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"     
    android:background="@drawable/profile_background"
    />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top