CheckedTextViewCompat

Added in 1.6.0

public final class CheckedTextViewCompat


Helper for accessing CheckedTextView.

Summary

Public methods

static @Nullable Drawable
@ReplaceWith(expression = "textView.getCheckMarkDrawable()")
getCheckMarkDrawable(@NonNull CheckedTextView textView)

This method is deprecated.

Call getCheckMarkDrawable directly.

static @Nullable ColorStateList

Returns the tint applied to the check mark drawable

static @Nullable PorterDuff.Mode

name android:checkMarkTintMode

static void

Applies a tint to the check mark drawable.

static void

Specifies the blending mode used to apply the tint specified by setCheckMarkTintList} to the check mark drawable.

Public methods

getCheckMarkDrawable

Added in 1.6.0
Deprecated in 1.15.0
@ReplaceWith(expression = "textView.getCheckMarkDrawable()")
public static @Nullable Drawable getCheckMarkDrawable(@NonNull CheckedTextView textView)

Returns the drawable used as the check mark image

getCheckMarkTintList

Added in 1.6.0
public static @Nullable ColorStateList getCheckMarkTintList(@NonNull CheckedTextView textView)

Returns the tint applied to the check mark drawable

getCheckMarkTintMode

Added in 1.6.0
public static @Nullable PorterDuff.Mode getCheckMarkTintMode(@NonNull CheckedTextView textView)

name android:checkMarkTintMode

Returns
@Nullable PorterDuff.Mode

the blending mode used to apply the tint to the check mark drawable

setCheckMarkTintList

Added in 1.6.0
public static void setCheckMarkTintList(
    @NonNull CheckedTextView textView,
    @Nullable ColorStateList tint
)

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

Subsequent calls to setCheckMarkDrawable should automatically mutate the drawable and apply the specified tint and tint mode using setTintList.

Parameters
@NonNull CheckedTextView textView

CheckedTextView for which to apply the tint.

@Nullable ColorStateList tint

the tint to apply, may be null to clear tint

setCheckMarkTintMode

Added in 1.6.0
public static void setCheckMarkTintMode(
    @NonNull CheckedTextView textView,
    @Nullable PorterDuff.Mode tintMode
)

Specifies the blending mode used to apply the tint specified by setCheckMarkTintList} to the check mark drawable. The default mode is SRC_IN.

Parameters
@NonNull CheckedTextView textView

CheckedTextView for which to apply the tint mode.

@Nullable PorterDuff.Mode tintMode

the blending mode used to apply the tint, may be null to clear tint