|
16 | 16 | -->
|
17 | 17 | <resources xmlns:tools="http://schemas.android.com/tools">
|
18 | 18 |
|
| 19 | + <!-- Styles for M3 Expressive SearchBar. --> |
| 20 | + |
| 21 | + <style name="Widget.Material3Expressive.SearchBar" parent="Widget.Material3.SearchBar"> |
| 22 | + <item name="backgroundTint">?attr/colorSurfaceContainer</item> |
| 23 | + <item name="liftOnScrollColor">?attr/colorSurfaceContainerHighest</item> |
| 24 | + <item name="liftOnScroll">true</item> |
| 25 | + <item name="contentInsetStart">24dp</item> |
| 26 | + <item name="android:paddingEnd">4dp</item> |
| 27 | + <item name="android:maxWidth">720dp</item> |
| 28 | + </style> |
| 29 | + |
| 30 | + <style name="Widget.Material3Expressive.SearchBar.CenteredText"> |
| 31 | + <item name="contentInsetStart">0dp</item> |
| 32 | + <item name="android:paddingStart">4dp</item> |
| 33 | + <item name="hideNavigationIcon">true</item> |
| 34 | + <item name="textCentered">true</item> |
| 35 | + </style> |
| 36 | + |
| 37 | + <style name="Widget.Material3Expressive.SearchBar.Outlined" parent="Widget.Material3.SearchBar.Outlined"> |
| 38 | + <item name="backgroundTint">?attr/colorSurfaceContainer</item> |
| 39 | + <item name="liftOnScrollColor">?attr/colorSurfaceContainerHighest</item> |
| 40 | + <item name="liftOnScroll">true</item> |
| 41 | + </style> |
| 42 | + |
| 43 | + <style name="Widget.Material3Expressive.SearchView" parent="Widget.Material3.SearchView"/> |
| 44 | + |
| 45 | + <style name="Widget.Material3Expressive.SearchBar.CenteredText.AppBarWithSearch"> |
| 46 | + <item name="android:maxWidth">312dp</item> |
| 47 | + <item name="defaultMarginsEnabled">false</item> |
| 48 | + <item name="android:layout_gravity">center</item> |
| 49 | + <item name="android:layout_marginStart">8dp</item> |
| 50 | + <item name="android:layout_marginEnd">8dp</item> |
| 51 | + </style> |
| 52 | + |
| 53 | + <style name="Widget.Material3Expressive.SearchBar.AppBarWithSearch"> |
| 54 | + <item name="android:maxWidth">312dp</item> |
| 55 | + <item name="defaultMarginsEnabled">false</item> |
| 56 | + <item name="hideNavigationIcon">true</item> |
| 57 | + <item name="android:layout_gravity">center</item> |
| 58 | + <item name="android:layout_marginStart">8dp</item> |
| 59 | + <item name="android:layout_marginEnd">8dp</item> |
| 60 | + </style> |
| 61 | + |
| 62 | + <style name="Widget.Material3Expressive.AppBarLayout.AppBarWithSearch"> |
| 63 | + <item name="android:paddingStart">4dp</item> |
| 64 | + <item name="android:paddingEnd">4dp</item> |
| 65 | + <item name="android:minHeight">64dp</item> |
| 66 | + </style> |
| 67 | + |
| 68 | + <style name="Widget.Material3Expressive.Toolbar.AppBarWithSearch"> |
| 69 | + <item name="buttonGravity">center_vertical</item> |
| 70 | + <item name="android:layout_marginEnd">0dp</item> |
| 71 | + <item name="layout_scrollFlags">scroll|snap|enterAlways</item> |
| 72 | + <item name="materialThemeOverlay">@style/ThemeOverlay.Material3.Search</item> |
| 73 | + </style> |
| 74 | + |
| 75 | + <style name="ThemeOverlay.Material3Expressive.AppBarWithSearch" parent=""> |
| 76 | + <item name="appBarLayoutStyle">@style/Widget.Material3Expressive.AppBarLayout.AppBarWithSearch</item> |
| 77 | + <item name="toolbarStyle">@style/Widget.Material3Expressive.Toolbar.AppBarWithSearch</item> |
| 78 | + <item name="materialSearchBarStyle">@style/Widget.Material3Expressive.SearchBar.CenteredText.AppBarWithSearch</item> |
| 79 | + </style> |
| 80 | + |
| 81 | + <!-- Styles for M3 SearchBar. --> |
| 82 | + |
19 | 83 | <style name="Widget.Material3.SearchBar" parent="android:Widget">
|
20 | 84 | <item name="backgroundTint">@macro/m3_comp_search_bar_container_color</item>
|
21 | 85 | <item name="enforceMaterialTheme">true</item>
|
|
0 commit comments