TintableCompoundButton

Added in 1.1.0

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 functions

ColorStateList?

Returns the tint applied to the button drawable

PorterDuff.Mode?

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

Unit

Applies a tint to the button drawable.

Unit

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

Public functions

getSupportButtonTintList

Added in 1.1.0
fun getSupportButtonTintList(): ColorStateList?

Returns the tint applied to the button drawable

getSupportButtonTintMode

Added in 1.1.0
fun getSupportButtonTintMode(): PorterDuff.Mode?

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

setSupportButtonTintList

Added in 1.1.0
fun setSupportButtonTintList(tint: ColorStateList?): Unit

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
tint: ColorStateList?

the tint to apply, may be null to clear tint

setSupportButtonTintMode

Added in 1.1.0
fun setSupportButtonTintMode(tintMode: PorterDuff.Mode?): Unit

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
tintMode: PorterDuff.Mode?

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