diff --git a/samples/SupportDesignDemos/res/layout/design_navigation.xml b/samples/SupportDesignDemos/res/layout/design_navigation.xml index 22e900a70..1ed87aecb 100644 --- a/samples/SupportDesignDemos/res/layout/design_navigation.xml +++ b/samples/SupportDesignDemos/res/layout/design_navigation.xml @@ -40,6 +40,7 @@ android:id="@+id/message" android:layout_width="match_parent" android:layout_height="match_parent" + android:freezesText="true" android:gravity="center" android:text="@string/navigation_1" android:textAppearance="?android:attr/textAppearanceLarge"/> @@ -50,6 +51,7 @@ android:id="@+id/navigation" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="start"/> + android:layout_gravity="start" + app:menu="@menu/navigation"/> diff --git a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/NavigationViewUsage.java b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/NavigationViewUsage.java index 46a57b542..b82a684f2 100644 --- a/samples/SupportDesignDemos/src/com/example/android/support/design/widget/NavigationViewUsage.java +++ b/samples/SupportDesignDemos/src/com/example/android/support/design/widget/NavigationViewUsage.java @@ -67,7 +67,6 @@ public class NavigationViewUsage extends AppCompatActivity { // Menu NavigationView navigation = (NavigationView) findViewById(R.id.navigation); - getMenuInflater().inflate(R.menu.navigation, navigation.getMenu()); navigation.setNavigationItemSelectedListener(mNavigationItemSelectedListener); navigation.inflateHeaderView(R.layout.design_navigation_header); }