mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Parameterize scrim color into theme attribute.
Modify FAB Transformation to use theme attribute rather than hardcoded value. Fix scrim's alpha value to actually reflect 32% black. PiperOrigin-RevId: 169620100
This commit is contained in:
parent
50b4dc51cf
commit
d78b8b4f72
@ -43,6 +43,10 @@
|
||||
resource. -->
|
||||
<attr name="colorPaletteSecondary" format="reference"/>
|
||||
|
||||
<!-- The scrim background that appears below modals and expanded navigation menus.
|
||||
The background can either be a color or a bitmap drawable with tileMode set to repeat. -->
|
||||
<attr name="scrimBackground" format="color|reference"/>
|
||||
|
||||
<!-- TODO: Need to audit these attributes to see if they are useful. -->
|
||||
<attr name="colorMaterialControl" format="color"/>
|
||||
<attr name="colorMaterialControlHighlight" format="color"/>
|
||||
|
||||
@ -56,5 +56,5 @@
|
||||
<color name="mtrl_text_btn_bg_color_pressed">#48191919</color>
|
||||
|
||||
<!-- 32% opacity black -->
|
||||
<color name="mtrl_scrim_color">#82000000</color>
|
||||
<color name="mtrl_scrim_color">#52000000</color>
|
||||
</resources>
|
||||
|
||||
@ -47,6 +47,8 @@
|
||||
|
||||
<item name="colorPalettePrimary">@array/design_default_color_palette_primary</item>
|
||||
<item name="colorPaletteSecondary">@array/design_default_color_palette_secondary</item>
|
||||
|
||||
<item name="scrimBackground">@color/mtrl_scrim_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.V14.Theme.MaterialComponents.Light" parent="Platform.MaterialComponents.Light">
|
||||
@ -62,6 +64,8 @@
|
||||
|
||||
<item name="colorPalettePrimary">@array/design_default_color_palette_primary</item>
|
||||
<item name="colorPaletteSecondary">@array/design_default_color_palette_secondary</item>
|
||||
|
||||
<item name="scrimBackground">@color/mtrl_scrim_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.V14.Theme.MaterialComponents.Dialog" parent="Platform.MaterialComponents.Dialog">
|
||||
@ -77,6 +81,8 @@
|
||||
|
||||
<item name="colorPalettePrimary">@array/design_default_color_palette_primary</item>
|
||||
<item name="colorPaletteSecondary">@array/design_default_color_palette_secondary</item>
|
||||
|
||||
<item name="scrimBackground">@color/mtrl_scrim_color</item>
|
||||
</style>
|
||||
|
||||
<style name="Base.V14.Theme.MaterialComponents.Light.Dialog" parent="Platform.MaterialComponents.Light.Dialog">
|
||||
@ -92,6 +98,8 @@
|
||||
|
||||
<item name="colorPalettePrimary">@array/design_default_color_palette_primary</item>
|
||||
<item name="colorPaletteSecondary">@array/design_default_color_palette_secondary</item>
|
||||
|
||||
<item name="scrimBackground">@color/mtrl_scrim_color</item>
|
||||
</style>
|
||||
|
||||
<!-- Themes in the "Base.Theme" family vary based on the current platform
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user