Skip to content

Commit 1b58f5f

Browse files
imhappipekingme
authored andcommitted
[Dialog] Add m3 styles for floating toolbar and docked toolbar for dialog
PiperOrigin-RevId: 755376708
1 parent 2e68da2 commit 1b58f5f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/java/com/google/android/material/dialog/res/values/themes_base.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@
249249
<item name="collapsingToolbarLayoutStyle">@style/Widget.Material3.CollapsingToolbar</item>
250250
<item name="collapsingToolbarLayoutMediumStyle">@style/Widget.Material3.CollapsingToolbar.Medium</item>
251251
<item name="collapsingToolbarLayoutLargeStyle">@style/Widget.Material3.CollapsingToolbar.Large</item>
252+
<item name="dockedToolbarStyle">@style/Widget.Material3.DockedToolbar</item>
253+
<item name="dockedToolbarVibrantStyle">@style/Widget.Material3.DockedToolbar.Vibrant</item>
252254
<item name="drawerLayoutStyle">@style/Widget.Material3.DrawerLayout</item>
253255
<item name="extendedFloatingActionButtonStyle">?attr/extendedFloatingActionButtonPrimaryStyle</item>
254256
<item name="extendedFloatingActionButtonSmallStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Small</item>
@@ -548,6 +550,8 @@
548550
<item name="collapsingToolbarLayoutStyle">@style/Widget.Material3.CollapsingToolbar</item>
549551
<item name="collapsingToolbarLayoutMediumStyle">@style/Widget.Material3.CollapsingToolbar.Medium</item>
550552
<item name="collapsingToolbarLayoutLargeStyle">@style/Widget.Material3.CollapsingToolbar.Large</item>
553+
<item name="dockedToolbarStyle">@style/Widget.Material3.DockedToolbar</item>
554+
<item name="dockedToolbarVibrantStyle">@style/Widget.Material3.DockedToolbar.Vibrant</item>
551555
<item name="drawerLayoutStyle">@style/Widget.Material3.DrawerLayout</item>
552556
<item name="extendedFloatingActionButtonStyle">?attr/extendedFloatingActionButtonPrimaryStyle</item>
553557
<item name="extendedFloatingActionButtonSmallStyle">@style/Widget.Material3.ExtendedFloatingActionButton.Small</item>
@@ -573,6 +577,8 @@
573577
<item name="floatingActionButtonLargeSecondaryStyle">@style/Widget.Material3.FloatingActionButton.Large.Secondary</item>
574578
<item name="floatingActionButtonLargeTertiaryStyle">@style/Widget.Material3.FloatingActionButton.Large.Tertiary</item>
575579
<item name="floatingActionButtonLargeSurfaceStyle">@style/Widget.Material3.FloatingActionButton.Large.Surface</item>
580+
<item name="floatingToolbarStyle">@style/Widget.Material3.FloatingToolbar</item>
581+
<item name="floatingToolbarVibrantStyle">@style/Widget.Material3.FloatingToolbar.Vibrant</item>
576582
<item name="linearProgressIndicatorStyle">@style/Widget.Material3.LinearProgressIndicator</item>
577583
<item name="loadingIndicatorStyle">@style/Widget.Material3.LoadingIndicator</item>
578584
<item name="materialIconButtonStyle">@style/Widget.Material3.Button.IconButton</item>

lib/javatests/com/google/android/material/theme/ThemeTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ public class ThemeTest {
425425
R.attr.extendedFloatingActionButtonSecondaryStyle,
426426
R.attr.extendedFloatingActionButtonTertiaryStyle,
427427
R.attr.extendedFloatingActionButtonSurfaceStyle,
428+
R.attr.dockedToolbarStyle,
429+
R.attr.dockedToolbarVibrantStyle,
428430
R.attr.floatingActionButtonStyle,
429431
R.attr.floatingActionButtonPrimaryStyle,
430432
R.attr.floatingActionButtonSecondaryStyle,
@@ -440,6 +442,8 @@ public class ThemeTest {
440442
R.attr.floatingActionButtonLargeSecondaryStyle,
441443
R.attr.floatingActionButtonLargeTertiaryStyle,
442444
R.attr.floatingActionButtonLargeSurfaceStyle,
445+
R.attr.floatingToolbarStyle,
446+
R.attr.floatingToolbarVibrantStyle,
443447
R.attr.linearProgressIndicatorStyle,
444448
R.attr.materialIconButtonStyle,
445449
R.attr.materialButtonOutlinedStyle,

0 commit comments

Comments
 (0)