Я использую DrawerLayout
, чтобы показать Navigation Drawer
, в этом A NavigationView
, код xml
:
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>
![ScreenImage](https://i.stack.imgur.com/QBL3C.png)
В RecyclerView
у меня есть только 3 элемента, которые нужно показать,и они располагаются на верхней части макета RecyclerView
, который я не хочу.Поэтому мой вопрос здесь заключается в том, как отправить эти элементы в нижнюю часть RecyclerView
(как показано на рисунке).