CheckedTextViewCompat

public final class CheckedTextViewCompat
extends Object

java.lang.Object
   ↳ androidx.core.widget.CheckedTextViewCompat


Helper for accessing CheckedTextView.

Summary

Public methods

static Drawable getCheckMarkDrawable(CheckedTextView textView)

Returns the drawable used as the check mark image

static ColorStateList getCheckMarkTintList(CheckedTextView textView)

Returns the tint applied to the check mark drawable

static PorterDuff.Mode getCheckMarkTintMode(CheckedTextView textView)
static void setCheckMarkTintList(CheckedTextView textView, ColorStateList tint)

Applies a tint to the check mark drawable.

static void setCheckMarkTintMode(CheckedTextView textView, PorterDuff.Mode tintMode)

Specifies the blending mode used to apply the tint specified by setCheckMarkTintList(CheckedTextView, ColorStateList)} to the check mark drawable.

Inherited methods

Public methods

getCheckMarkDrawable

public static Drawable getCheckMarkDrawable (CheckedTextView textView)

Returns the drawable used as the check mark image

Parameters
textView CheckedTextView

Returns
Drawable

getCheckMarkTintList

public static ColorStateList getCheckMarkTintList (CheckedTextView textView)

Returns the tint applied to the check mark drawable

Parameters
textView CheckedTextView

Returns
ColorStateList

getCheckMarkTintMode

public static PorterDuff.Mode getCheckMarkTintMode (CheckedTextView textView)

Parameters
textView CheckedTextView

Returns
PorterDuff.Mode the blending mode used to apply the tint to the check mark drawable

setCheckMarkTintList

public static void setCheckMarkTintList (CheckedTextView textView, 
                ColorStateList tint)

Applies a tint to the check mark drawable. Does not modify the current tint mode, which is PorterDuff.Mode.SRC_IN by default.

Subsequent calls to CheckedTextView.setCheckMarkDrawable(Drawable) should automatically mutate the drawable and apply the specified tint and tint mode using DrawableCompat.setTintList(Drawable, ColorStateList).

Parameters
textView CheckedTextView

tint ColorStateList: the tint to apply, may be null to clear tint

setCheckMarkTintMode

public static void setCheckMarkTintMode (CheckedTextView textView, 
                PorterDuff.Mode tintMode)

Specifies the blending mode used to apply the tint specified by setCheckMarkTintList(CheckedTextView, ColorStateList)} to the check mark drawable. The default mode is PorterDuff.Mode.SRC_IN.

Parameters
textView CheckedTextView

tintMode PorterDuff.Mode: the blending mode used to apply the tint, may be null to clear tint