Skip to content

Commit 08f72b4

Browse files
committed
docs: Update samples prebuilts for mnc-docs
Change-Id: I7175f178f95d76d9056d8e87b5a96700e3c9309c
1 parent 8e7e496 commit 08f72b4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

samples/browseable/WearDrawers/res/layout/activity_main.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<android.support.wearable.view.drawer.WearableDrawerLayout
1818
android:id="@+id/drawer_layout"
1919
xmlns:android="http://schemas.android.com/apk/res/android"
20+
xmlns:app="http://schemas.android.com/apk/res-auto"
2021
xmlns:tools="http://schemas.android.com/tools"
2122
android:layout_width="match_parent"
2223
android:layout_height="match_parent"
@@ -38,6 +39,7 @@
3839
android:id="@+id/bottom_action_drawer"
3940
android:layout_width="match_parent"
4041
android:layout_height="match_parent"
42+
app:action_menu="@menu/action_drawer_menu"
4143
android:background="@color/grey"/>
4244

4345
</android.support.wearable.view.drawer.WearableDrawerLayout>

samples/browseable/WearDrawers/src/com.example.android.wearable.wear.weardrawers/MainActivity.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,16 @@ protected void onCreate(Bundle savedInstanceState) {
8585
mWearableNavigationDrawer =
8686
(WearableNavigationDrawer) findViewById(R.id.top_navigation_drawer);
8787
mWearableNavigationDrawer.setAdapter(new NavigationAdapter(this));
88+
8889
// Peeks Navigation drawer on the top.
8990
mWearableDrawerLayout.peekDrawer(Gravity.TOP);
9091

9192
// Bottom Action Drawer
9293
mWearableActionDrawer =
9394
(WearableActionDrawer) findViewById(R.id.bottom_action_drawer);
94-
// Populate Action Drawer Menu
95-
Menu menu = mWearableActionDrawer.getMenu();
96-
MenuInflater inflater = getMenuInflater();
97-
inflater.inflate(R.menu.action_drawer_menu, menu);
95+
9896
mWearableActionDrawer.setOnMenuItemClickListener(this);
97+
9998
// Peeks action drawer on the bottom.
10099
mWearableDrawerLayout.peekDrawer(Gravity.BOTTOM);
101100

0 commit comments

Comments
 (0)