Skip to content

Commit

Permalink
[Ripple] Updated focused and pressed state from 0.12 to 0.10 to incre…
Browse files Browse the repository at this point in the history
…ase the contrast ratio with tonal surface color.

PiperOrigin-RevId: 566768258
  • Loading branch information
pekingme authored and dsn5ft committed Sep 20, 2023
1 parent 1e9f5f0 commit bc824b4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Expand Up @@ -27,9 +27,11 @@
<!-- RippleDrawable uses half the alpha for pressed for the overlay and half the alpha for pressed
for the ripple animation. Using double the desired alpha ensures that the desired alpha
is displayed when the overlay and ripple display at different times (unbounded ripples). -->
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.24</item>
<!-- The resource value 0.24 has been overridden by the config. -->
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.20</item>
<!-- RippleDrawable uses half the alpha for focused, so this is double the desired alpha. -->
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.24</item>
<!-- The resource value 0.24 has been overridden by the config. -->
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.20</item>
<!-- RippleDrawable uses half the alpha for hovered, so this is double the desired alpha.
The hovered state is not supported by RippleDrawable pre-24. -->
<item name="m3_sys_state_hover_state_layer_opacity" format="float" type="dimen">0.16</item>
Expand Down
Expand Up @@ -21,9 +21,11 @@

<!-- Generated from token set (md.sys.state) in context (platform=android, audience=3p). -->
<item name="m3_sys_state_dragged_state_layer_opacity" format="float" type="dimen">0.16</item>
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.12</item>
<!-- The resource value 0.12 has been overridden by the config. -->
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.10</item>
<!-- RippleDrawable uses 60% of the focused alpha for API 28+. -->
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.2</item>
<!-- The resource value 0.2 has been overridden by the config. -->
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.17</item>
<!-- RippleDrawable uses 20% of the hovered alpha for API 28+. -->
<item name="m3_sys_state_hover_state_layer_opacity" format="float" type="dimen">0.4</item>

Expand Down
Expand Up @@ -21,8 +21,10 @@

<!-- Generated from token set (md.sys.state) in context (platform=android, audience=3p). -->
<item name="m3_sys_state_dragged_state_layer_opacity" format="float" type="dimen">0.16</item>
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.12</item>
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.12</item>
<!-- The resource value 0.12 has been overridden by the config. -->
<item name="m3_sys_state_pressed_state_layer_opacity" format="float" type="dimen">0.10</item>
<!-- The resource value 0.12 has been overridden by the config. -->
<item name="m3_sys_state_focus_state_layer_opacity" format="float" type="dimen">0.10</item>
<item name="m3_sys_state_hover_state_layer_opacity" format="float" type="dimen">0.08</item>

</resources>

0 comments on commit bc824b4

Please sign in to comment.