TintableBackgroundView

Added in 1.1.0

public 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 methods

abstract @Nullable ColorStateList

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

abstract @Nullable PorterDuff.Mode

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

abstract void

Applies a tint to the background drawable.

abstract void

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

Public methods

getSupportBackgroundTintList

Added in 1.1.0
abstract @Nullable ColorStateList getSupportBackgroundTintList()

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

Returns
@Nullable ColorStateList

the tint applied to the background drawable

getSupportBackgroundTintMode

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

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

Returns
@Nullable PorterDuff.Mode

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

setSupportBackgroundTintList

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

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
@Nullable ColorStateList tint

the tint to apply, may be null to clear tint

setSupportBackgroundTintMode

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

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