Answer the question
In order to leave comments, you need to log in
How to implement ActionBarDrawerToggle listener for second NavigationView?
Please tell me how to implement the ActionBarDrawerToggle listener for a specific NavigationView. The DrawerLayout has two NavigationViews at the beginning and at the end.
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:headerLayout="@layout/side_menu_header"
app:menu="@menu/side_menu"/>
<android.support.design.widget.NavigationView
android:id="@+id/navigation2"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
app:headerLayout="@layout/side_menu_header"
app:menu="@menu/side_menu"/>
ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar,
R.string.open_drawer_state, R.string.close_drawer_state);
drawer.addDrawerListener(toggle);
toggle.syncState();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question