I am using DrawerLayout
to show Navigation Drawer
, in that A NavigationView
, the xml
code is :
MyDrawerLayout.xml
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true">
<include layout="@layout/layout_navigation_list" />
</android.support.design.widget.NavigationView>
layout_navigation_list.xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:orientation="vertical">
<include
android:id="@+id/headerLayout"
layout="@layout/nav_header_dash_nav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_gravity="top"
android:gravity="top" />
<android.support.v7.widget.RecyclerView
android:id="@+id/recyclerNav"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/headerLayout"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:background="@color/white"
android:foregroundGravity="bottom" />
</RelativeLayout>
In the RecyclerView
i have only 3 items to be shown, and they are aligning on the top of the RecyclerView
layout which is i don't want. Hence my question here is , how to send those items to the bottom of the RecyclerView
(just like shown in the image).