TintableBackgroundView

Added in 1.1.0

interface TintableBackgroundView

Known direct subclasses
AppCompatAutoCompleteTextView

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

AppCompatButton

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

AppCompatCheckBox

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

AppCompatCheckedTextView

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

AppCompatEditText

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

AppCompatImageButton

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

AppCompatImageView

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

AppCompatMultiAutoCompleteTextView

A MultiAutoCompleteTextView which supports compatible features on older version of the platform, including:

AppCompatRadioButton

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

AppCompatSpinner

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

AppCompatTextView

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

AppCompatToggleButton

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

Known indirect subclasses
EmojiAppCompatButton

AppCompatButton widget enhanced with emoji capability by using EmojiTextViewHelper.

EmojiAppCompatEditText

AppCompatEditText widget enhanced with emoji capability by using EmojiEditTextHelper.

EmojiAppCompatTextView

AppCompatTextView widget enhanced with emoji capability by using EmojiTextViewHelper.

GuidedActionAppCompatEditText

A custom EditText that satisfies the IME key monitoring requirements of GuidedStepFragment.

ImageFilterButton

An AppCompatImageButton that can display, combine and filter images.

ImageFilterView

An ImageView that can display, combine and filter images.

MotionButton

A MotionButton is an AppCompatButton that can round its edges.


Interface which allows a android.view.View to receive background tinting calls from ViewCompat when running on API v20 devices or lower.

Summary

Public functions

ColorStateList?

Return the tint applied to the background drawable, if specified.

PorterDuff.Mode?

Return the blending mode used to apply the tint to the background drawable, if specified.

Unit

Applies a tint to the background drawable.

Unit

Specifies the blending mode used to apply the tint specified by setSupportBackgroundTintList} to the background drawable.

Public functions

getSupportBackgroundTintList

Added in 1.1.0
fun getSupportBackgroundTintList(): ColorStateList?

Return the tint applied to the background drawable, if specified.

Returns
ColorStateList?

the tint applied to the background drawable

getSupportBackgroundTintMode

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

Return the blending mode used to apply the tint to the background drawable, if specified.

Returns
PorterDuff.Mode?

the blending mode used to apply the tint to the background drawable

setSupportBackgroundTintList

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

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

Subsequent calls to View.setBackground(Drawable) will 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

setSupportBackgroundTintMode

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

Specifies the blending mode used to apply the tint specified by setSupportBackgroundTintList} to the background 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