File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
samples/browseable/WearDrawers
src/com.example.android.wearable.wear.weardrawers Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 17
17
<android .support.wearable.view.drawer.WearableDrawerLayout
18
18
android : id =" @+id/drawer_layout"
19
19
xmlns : android =" http://schemas.android.com/apk/res/android"
20
+ xmlns : app =" http://schemas.android.com/apk/res-auto"
20
21
xmlns : tools =" http://schemas.android.com/tools"
21
22
android : layout_width =" match_parent"
22
23
android : layout_height =" match_parent"
38
39
android : id =" @+id/bottom_action_drawer"
39
40
android : layout_width =" match_parent"
40
41
android : layout_height =" match_parent"
42
+ app : action_menu =" @menu/action_drawer_menu"
41
43
android : background =" @color/grey" />
42
44
43
45
</android .support.wearable.view.drawer.WearableDrawerLayout>
Original file line number Diff line number Diff line change @@ -85,17 +85,16 @@ protected void onCreate(Bundle savedInstanceState) {
85
85
mWearableNavigationDrawer =
86
86
(WearableNavigationDrawer ) findViewById (R .id .top_navigation_drawer );
87
87
mWearableNavigationDrawer .setAdapter (new NavigationAdapter (this ));
88
+
88
89
// Peeks Navigation drawer on the top.
89
90
mWearableDrawerLayout .peekDrawer (Gravity .TOP );
90
91
91
92
// Bottom Action Drawer
92
93
mWearableActionDrawer =
93
94
(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
+
98
96
mWearableActionDrawer .setOnMenuItemClickListener (this );
97
+
99
98
// Peeks action drawer on the bottom.
100
99
mWearableDrawerLayout .peekDrawer (Gravity .BOTTOM );
101
100
You can’t perform that action at this time.
0 commit comments