File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
catalog/java/io/material/catalog/search/res/layout
lib/java/com/google/android/material/search Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3939 android : layout_height =" wrap_content"
4040 android : fitsSystemWindows =" true"
4141 app : liftOnScroll =" false"
42- app : statusBarForeground =" ?attr/colorSurface" >
42+ app : statusBarForeground =" ?attr/colorSurface"
43+ android : touchscreenBlocksFocus =" false" >
4344
4445 <com .google.android.material.search.SearchBar
4546 android : id =" @+id/open_search_bar"
Original file line number Diff line number Diff line change @@ -1061,6 +1061,9 @@ public boolean onDependentViewChanged(
10611061 if (!initialized && dependency instanceof AppBarLayout ) {
10621062 initialized = true ;
10631063 AppBarLayout appBarLayout = (AppBarLayout ) dependency ;
1064+ // Necessary to enable keyboard navigation across searchbar and other elements due to
1065+ // toolbar being a keyboard navigation cluster from API 26+
1066+ appBarLayout .setTouchscreenBlocksFocus (false );
10641067 setAppBarLayoutTransparent (appBarLayout );
10651068 }
10661069 return changed ;
Original file line number Diff line number Diff line change 6262 <item name =" android:paddingStart" >4dp</item >
6363 <item name =" android:paddingEnd" >4dp</item >
6464 <item name =" android:minHeight" >64dp</item >
65+ <item name =" android:touchscreenBlocksFocus" >false</item >
6566 </style >
6667
6768 <style name =" Widget.Material3Expressive.Toolbar.AppBarWithSearch" >
6869 <item name =" buttonGravity" >center_vertical</item >
6970 <item name =" android:layout_marginEnd" >0dp</item >
7071 <item name =" layout_scrollFlags" >scroll|snap|enterAlways</item >
7172 <item name =" materialThemeOverlay" >@style/ThemeOverlay.Material3.Search</item >
73+ <item name =" android:touchscreenBlocksFocus" >false</item >
7274 </style >
7375
7476 <style name =" ThemeOverlay.Material3Expressive.AppBarWithSearch" parent =" " >
9698 <item name =" materialThemeOverlay" >@style/ThemeOverlay.Material3.Search</item >
9799 <item name =" liftOnScroll" >false</item >
98100 <item name =" liftOnScrollColor" >?attr/colorSurfaceContainerHighest</item >
101+ <!-- Necessary to enable keyboard navigation across searchbar and other elements due to toolbar
102+ being a keyboard navigation cluster from API 26+ -->
103+ <item name =" android:touchscreenBlocksFocus" >false</item >
99104
100105 <!-- On newer API levels, hide shadows while keeping elevation. -->
101106 <item name =" android:outlineAmbientShadowColor" tools : targetApi =" p" >@android:color/transparent</item >
You can’t perform that action at this time.
0 commit comments