Q:

Android add textview at the bottom of listview in drawerlayout

my layout contains a drawerlayout with a fragment container and a listview. The listview contains three items, which I've added with an adapter.
<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 to display Fragments -->
<FrameLayout
    android:id="@+id/frame_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<!-- Listview to display slider menu -->
<ListView
    android:id="@+id/list_slidermenu"
    android:layout_width="240dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:background="@drawable/listview_background_drawable"
    android:listSelector="@android:color/transparent"
    android:cacheColorHint="@android:color/transparent"/>

</android.support.v4.widget.DrawerLayout>

So now I want to add a view to the bottom of the listview (screen). I tried it with addFooterView(), but this just add the view under the last item and not at the bottom of the screen. I now there are a few examples on stackoverflow how to do it but they don't work for me, because of my drawerlayout. 
Is there a way to add the view to my listview and set the alignment of the view to the bottom of the screen?

A:

You can do this by adding a layout as footerview to listview or use this code just change the header to footer.  

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

    <RelativeLayout
        android:id="@+id/slider"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="start" >

        <LinearLayout
            android:id="@+id/header_view"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:background="#AA000000"
            android:orientation="horizontal"
            android:padding="5dp" >

            <com.wholesaleraja.model.RoundImage
                android:id="@+id/profile_icon"
                android:layout_width="70dp"
                android:layout_height="70dp"
                android:layout_gravity="center_vertical"
                android:padding="5dp"
                android:src="@drawable/default_image_male" />

            <LinearLayout
                android:id="@+id/profile_name_layout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:orientation="vertical"
                android:padding="5dp" >

                <TextView
                    android:id="@+id/profile_name"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center_vertical"
                    android:textColor="#ffffff"
                    android:textSize="20sp" />

                <TextView
                    android:id="@+id/profile_email"
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content"
                    android:textColor="#ffffff"
                    android:textSize="12sp" />
            </LinearLayout>
        </LinearLayout>

        <View
            android:id="@+id/header_divider"
            android:layout_width="fill_parent"
            android:layout_height="2dp"
            android:layout_below="@+id/header_view"
            android:background="@color/list_divider" />

        <ListView
            android:id="@+id/list_slidermenu"
            android:layout_width="240dp"
            android:layout_height="match_parent"
            android:layout_below="@+id/header_divider"
            android:background="@color/list_header"
            android:choiceMode="singleChoice"
            android:divider="@color/list_divider"
            android:dividerHeight="1dp"
            android:overScrollMode="never" />

    </RelativeLayout>

</android.support.v4.widget.DrawerLayout>

A:

In this case, the bottom layout should be taken out of the ListView. You need to enclose all your elements inside a parent layout (preferably a a RelativeLayout) and declare the DrawerLayout and your bottom layout inside it. Also, set android:layout_alignParentBottom="true" for the bottom Layout so that it always remains at the bottom.
Example:
<RelativeLayout
    ...
    ... >
    (put your drawer layout xml here)

    <BottomLayout
         android:layout_alignParentBottom="true" >
    </BottomLayout>
</RelativeLayout>

