RippleDrawableCompat

A compat Drawable that is used to provide an overlay for pressed, focused, and hovered states (only when in enabled). This is intended to be used pre-Lollipop.

This Drawable is a MaterialShapeDrawable so that it can be shaped to match a MaterialShapeDrawable background.

Unlike the framework android.graphics.drawable.RippleDrawable, this will not apply different alphas for pressed, focused, and hovered states and it does not provide a ripple animation for the pressed state.

Constructors

Link copied to clipboard
constructor(shapeAppearanceModel: ShapeAppearanceModel)
Creates a RippleDrawableCompat with the given shape that will only draw when enabled and at least one of: pressed, focused, or hovered.

Functions

Link copied to clipboard
open fun draw(canvas: Canvas)
Link copied to clipboard
Link copied to clipboard
open fun getOpacity(): Int
Link copied to clipboard
Get the ShapeAppearanceModel containing the path that will be rendered in this drawable.
Link copied to clipboard
open fun isStateful(): Boolean
Link copied to clipboard
Link copied to clipboard
open fun setAlpha(alpha: Int)
Link copied to clipboard
open fun setColorFilter(@Nullable colorFilter: ColorFilter)
Link copied to clipboard
open fun setShapeAppearanceModel(@NonNull shapeAppearanceModel: ShapeAppearanceModel)
Sets the ShapeAppearanceModel that defines the shape.
Link copied to clipboard
open fun setTint(@ColorInt tintColor: Int)
Link copied to clipboard
open fun setTintList(@Nullable tintList: ColorStateList)
Link copied to clipboard
open fun setTintMode(@Nullable tintMode: PorterDuff.Mode)