3 Commits

Author SHA1 Message Date
isabellekim
5bf8f92e78 Update RippleDrawableCompat to use MaterialShapeDrawable as a delegate and implement ConstantState.
This will make RippleDrawable work with a single-value ColorStateList as previously it getConstantState().newDrawable() would recreate a MaterialShapeDrawable, losing the logic in RippleDrawableCompat.

PiperOrigin-RevId: 254207262
2019-06-24 17:02:22 -04:00
isabellekim
cadd0238cf Refactor RippleDrawableCompat to add a method to RippleUtils to determine whether a compat (pre-21) "ripple" should be drawn. This will be used by components that handle their own drawing of compat ripples (like Chip).
PiperOrigin-RevId: 253992004
2019-06-24 16:51:22 -04:00
isabellekim
633b5a32c2 Create compat ripples that are based on MaterialShapeDrawable and only draw when enabled and in the pressed, focused, or hovered states.
PiperOrigin-RevId: 253783048
2019-06-18 13:52:05 -04:00