Merge pull request #759 from veyndan/navigation-view-fix

Fix crashes where R.id.navigation_view wasn't found
This commit is contained in:
Josephine Lim 2017-07-03 18:07:13 +10:00 committed by GitHub
commit e7044c9dda
2 changed files with 14 additions and 23 deletions

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
@ -22,17 +23,12 @@
android:orientation="vertical"></FrameLayout> android:orientation="vertical"></FrameLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <android.support.design.widget.NavigationView
android:id="@+id/drawer_pane" android:id="@+id/navigation_view"
android:layout_width="320dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:background="@android:color/white"> app:headerLayout="@layout/drawer_header"
app:menu="@menu/drawer" />
<FrameLayout </android.support.v4.widget.DrawerLayout>
android:id="@+id/drawer_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>

View file

@ -36,17 +36,12 @@
</FrameLayout> </FrameLayout>
</RelativeLayout> </RelativeLayout>
<RelativeLayout <android.support.design.widget.NavigationView
android:id="@+id/drawer_pane" android:id="@+id/navigation_view"
android:layout_width="320dp" android:layout_width="wrap_content"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_gravity="start" android:layout_gravity="start"
android:background="@android:color/white"> app:headerLayout="@layout/drawer_header"
app:menu="@menu/drawer" />
<FrameLayout </android.support.v4.widget.DrawerLayout>
android:id="@+id/drawer_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>