Threre are 2 navigation views in my drawer layout.
First one is for classic navigation. Point of second one is to display linearlayout with interactive recyclerviews for current activity (not navigation).
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<include
layout="@layout/app_bar_main"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<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"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer"/>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:id="@+id/nav_view_upper_rv"
android:layout_width="match_parent"
android:layout_height="250dp"/>
<android.support.v7.widget.RecyclerView
android:id="@+id/nav_view_lower_rv"
android:layout_width="match_parent"
android:layout_height="250dp"/>
</LinearLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
Second drawer I can open only by sliding it but I also want to open it by clicking on another (not-hamburger) icon on toolbar. Doing that way I want to combain all advantages of preset navigation and customizing in material design for both drawers.
Is it possible ? If I'm doing totally wrong advice me the right solution please
There are nearby questions: Two Navigation Drawer on same Activity
How to open Navigation Drawer with no actionbar, open with just a button