File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
catalog/java/io/material/catalog/bottomappbar Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change 1818
1919import io .material .catalog .R ;
2020
21+ import android .annotation .SuppressLint ;
2122import android .os .Bundle ;
2223import androidx .appcompat .app .AppCompatActivity ;
2324import androidx .appcompat .widget .Toolbar ;
@@ -184,6 +185,7 @@ private void setUpBottomAppBarShapeAppearance() {
184185 babBackground .getShapeAppearanceModel ().toBuilder ().setTopEdge (topEdge ).build ());
185186 }
186187
188+ @ SuppressLint ("NewApi" )
187189 protected void setUpBottomDrawer (View view ) {
188190 View bottomDrawer = coordinatorLayout .findViewById (R .id .bottom_drawer );
189191 bottomDrawerBehavior = BottomSheetBehavior .from (bottomDrawer );
@@ -193,6 +195,7 @@ protected void setUpBottomDrawer(View view) {
193195 v -> bottomDrawerBehavior .setState (BottomSheetBehavior .STATE_HALF_EXPANDED ));
194196 bar .setNavigationIcon (R .drawable .ic_drawer_menu_24px );
195197 bar .replaceMenu (R .menu .demo_primary );
198+ bar .getMenu ().findItem (R .id .menu_search ).getActionView ().requestFocus ();
196199 }
197200
198201 private void showSnackbar (CharSequence text ) {
Original file line number Diff line number Diff line change 1818<menu xmlns : android =" http://schemas.android.com/apk/res/android"
1919 xmlns : app =" http://schemas.android.com/apk/res-auto" >
2020 <item
21+ android : id =" @+id/menu_search"
2122 android : icon =" @drawable/ic_search_24px"
2223 android : title =" @string/cat_bottomappbar_search"
2324 app : showAsAction =" ifRoom" />
You can’t perform that action at this time.
0 commit comments