|
15 | 15 | ~ limitations under the License.
|
16 | 16 | -->
|
17 | 17 | <resources>
|
18 |
| - |
19 |
| - <style name="Widget.Material3.FloatingToolbar" parent=""> |
| 18 | + <!-- Base style for Floating Toolbar. Do not use; use one of the horizontal or vertical variants, |
| 19 | + instead. --> |
| 20 | + <style name="Base.Widget.Material3.FloatingToolbar" parent=""> |
20 | 21 | <item name="enforceMaterialTheme">true</item>
|
21 |
| - <item name="android:minHeight">@dimen/m3_floatingtoolbar_min_height</item> |
22 |
| - <item name="android:minWidth">@dimen/m3_floatingtoolbar_min_width</item> |
23 |
| - <item name="backgroundTint">?attr/colorSurfaceContainer</item> |
24 |
| - <item name="shapeAppearance">@style/ShapeAppearance.Material3.Corner.Full</item> |
| 22 | + <item name="android:minHeight">@dimen/m3_comp_toolbar_floating_container_height</item> |
| 23 | + <item name="android:minWidth">@dimen/m3_comp_toolbar_floating_container_height</item> |
| 24 | + <item name="backgroundTint">@macro/m3_comp_toolbar_floating_standard_container_color</item> |
| 25 | + <item name="shapeAppearance">@style/ShapeAppearance.M3.Comp.Toolbar.Floating.Container.Shape</item> |
| 26 | + <item name="android:layout_margin">@dimen/m3_comp_toolbar_floating_container_external_padding</item> |
| 27 | + </style> |
| 28 | + |
| 29 | + <!-- Style for Horizontal Floating Toolbar. |
| 30 | + Note that layout_* attributes break when set via a default style. Always set this style |
| 31 | + explicitly on the layout to ensure that layout_* attributes are set properly. --> |
| 32 | + <style name="Widget.Material3.FloatingToolbar.Horizontal" parent="Base.Widget.Material3.FloatingToolbar"> |
| 33 | + <item name="android:paddingStart">@dimen/m3_comp_toolbar_floating_container_leading_space</item> |
| 34 | + <item name="android:paddingEnd">@dimen/m3_comp_toolbar_floating_container_trailing_space</item> |
| 35 | + <item name="android:layout_gravity">bottom|center</item> |
| 36 | + </style> |
| 37 | + |
| 38 | + <!-- Style for Vibrant color variation of the Horizontal Floating Toolbar. |
| 39 | + Note that layout_* attributes break when set via a default style. Always set this style |
| 40 | + explicitly on the layout to ensure that layout_* attributes are set properly. --> |
| 41 | + <style name="Widget.Material3.FloatingToolbar.Horizontal.Vibrant"> |
| 42 | + <item name="backgroundTint">@macro/m3_comp_toolbar_floating_vibrant_container_color</item> |
| 43 | + </style> |
| 44 | + |
| 45 | + <!-- Style for Vibrant color variation of the Vertical Floating Toolbar. Defaults to the right |
| 46 | + side; override android:layout_gravity to position the toolbar on the left side. Note that |
| 47 | + layout_* attributes break when set via a default style. Always set this style explicitly on |
| 48 | + the layout to ensure that layout_* attributes are set properly. --> |
| 49 | + <style name="Widget.Material3.FloatingToolbar.Vertical" parent="Base.Widget.Material3.FloatingToolbar"> |
| 50 | + <item name="android:paddingTop">@dimen/m3_comp_toolbar_floating_container_leading_space</item> |
| 51 | + <item name="android:paddingBottom">@dimen/m3_comp_toolbar_floating_container_trailing_space</item> |
| 52 | + <item name="android:layout_gravity">right|center</item> |
| 53 | + </style> |
| 54 | + |
| 55 | + <!-- Style for Vibrant color variation of the Vertical Floating Toolbar. Defaults to the right |
| 56 | + side; override android:layout_gravity to position the toolbar on the left side. Note that |
| 57 | + layout_* attributes break when set via a default style. Always set this style explicitly on |
| 58 | + the layout to ensure that layout_* attributes are set properly. --> |
| 59 | + <style name="Widget.Material3.FloatingToolbar.Vertical.Vibrant"> |
| 60 | + <item name="backgroundTint">@macro/m3_comp_toolbar_floating_vibrant_container_color</item> |
25 | 61 | </style>
|
26 | 62 |
|
27 | 63 | </resources>
|
0 commit comments