TintableCompoundButton

Added in 1.1.0

public interface TintableCompoundButton

Known direct subclasses
AppCompatCheckBox

A CheckBox which supports compatible features on older versions of the platform, including:

AppCompatRadioButton

A RadioButton which supports compatible features on older versions of the platform, including:


Interface which allows a android.widget.CompoundButton to receive tinting calls from CompoundButtonCompat when running on API v20 devices or lower.

Summary

Public methods

abstract @Nullable ColorStateList

Returns the tint applied to the button drawable

abstract @Nullable PorterDuff.Mode

Returns the blending mode used to apply the tint to the button drawable

abstract void

Applies a tint to the button drawable.

abstract void

Specifies the blending mode which should be used to apply the tint specified by setSupportButtonTintList to the button drawable.

Public methods

getSupportButtonTintList

Added in 1.1.0
abstract @Nullable ColorStateList getSupportButtonTintList()

Returns the tint applied to the button drawable

getSupportButtonTintMode

Added in 1.1.0
abstract @Nullable PorterDuff.Mode getSupportButtonTintMode()

Returns the blending mode used to apply the tint to the button drawable

setSupportButtonTintList

Added in 1.1.0
abstract void setSupportButtonTintList(@Nullable ColorStateList tint)

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

Subsequent calls to setButtonDrawable(Drawable) should automatically mutate the drawable and apply the specified tint and tint mode.

Parameters
@Nullable ColorStateList tint

the tint to apply, may be null to clear tint

setSupportButtonTintMode

Added in 1.1.0
abstract void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode)

Specifies the blending mode which should be used to apply the tint specified by setSupportButtonTintList to the button drawable. The default mode is SRC_IN.

Parameters
@Nullable PorterDuff.Mode tintMode

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