4

navigation view with custom content at bottom

i have implemented navigation view for sidebar menu.

i want to add some social networking buttons after the menu items that should scroll with the menus(in navigation view). I tried in this way

<android.support.design.widget.NavigationView
    android:id="@+id/navigation_view"
    android:layout_height="match_parent"
    android:layout_width="wrap_content"
    android:layout_gravity="start"
    app:headerLayout="@layout/navigation_header"
    app:itemTextColor="@color/state_list"
    app:itemIconTint="@color/state_list"
    app:itemBackground="@drawable/drawer_list_selector"
    app:menu="@menu/menu_navigation">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="20dp"
        android:layout_gravity="bottom"
        android:gravity="center">
        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center">
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="20dp"
            android:src="@drawable/facebook_icon"/>
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="20dp"
            android:src="@drawable/twitter_icon"/>
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginRight="20dp"
            android:src="@drawable/youtube"/>
        </LinearLayout>
    </LinearLayout>
    </android.support.design.widget.NavigationView>

This makes the footer content fixed. which overlaps on menu items.

Any solution?

Gurpreet Kaur
  • 434
  • 1
  • 4
  • 16

0 Answers0