mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-21 04:22:42 +08:00
Because ripples are implemented differently for different API levels, we are adding dimension resources that can be used when specific alphas are desired for the pressed, focused, and hovered states. Ripples on top of surface color should use: mtrl_low_ripple_pressed_alpha: effective 12% mtrl_low_ripple_focused_alpha: effective 12% mtrl_low_ripple_hovered_alpha: effective 4% mtrl_low_ripple_default_alpha: effective 0% Ripples on top of primary / secondary colors should use: mtrl_high_ripple_pressed_alpha: effective 24% mtrl_high_ripple_focused_alpha: effective 24% mtrl_high_ripple_hovered_alpha: effective 8% mtrl_high_ripple_default_alpha: effective 0% Note: the "default" alpha needs to be non-zero for API 22-27 in order to prevent ripples for terminating prematurely. PiperOrigin-RevId: 253825206