TintableBackgroundView
interface TintableBackgroundView
Known Direct Subclasses
AppCompatAutoCompleteTextView |
A AutoCompleteTextView which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#backgroundTint and R.attr#backgroundTintMode.
|
AppCompatButton |
A Button which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#backgroundTint and R.attr#backgroundTintMode.
|
AppCompatCheckBox |
A CheckBox 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:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#backgroundTint and R.attr#backgroundTintMode.
|
AppCompatImageButton |
A ImageButton which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#backgroundTint and R.attr#backgroundTintMode.
- Allows dynamic tint of its image via the image tint methods in
ImageViewCompat .
- Allows setting of the image tint using R.attr#tint and R.attr#tintMode.
|
AppCompatImageView |
A ImageView which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using androidx.appcompat.R.attr#backgroundTint and androidx.appcompat.R.attr#backgroundTintMode.
- Allows dynamic tint of its image via the image tint methods in
ImageViewCompat .
- Allows setting of the image tint using androidx.appcompat.R.attr#tint and androidx.appcompat.R.attr#tintMode.
|
AppCompatMultiAutoCompleteTextView |
A MultiAutoCompleteTextView which supports compatible features on older version of the platform, including:
- Supports R.attr#textAllCaps style attribute which works back to
Gingerbread .
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#backgroundTint and R.attr#backgroundTintMode.
|
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:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using R.attr#buttonTint and R.attr#buttonTintMode.
- Setting the popup theme using R.attr#popupTheme.
|
AppCompatTextView |
A TextView which supports compatible features on older versions of the platform, including:
- Allows dynamic tint of its background via the background tint methods in
androidx.core.view.ViewCompat .
- Allows setting of the background tint using androidx.appcompat.R.attr#backgroundTint and androidx.appcompat.R.attr#backgroundTintMode.
- Supports auto-sizing via
androidx.core.widget.TextViewCompat by allowing to instruct a TextView to let the size of the text expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. The style attributes associated with auto-sizing are androidx.appcompat.R.attr#autoSizeTextType, androidx.appcompat.R.attr#autoSizeMinTextSize, androidx.appcompat.R.attr#autoSizeMaxTextSize, androidx.appcompat.R.attr#autoSizeStepGranularity and androidx.appcompat.R.attr#autoSizePresetSizes, all of which work back to Ice Cream Sandwich .
|
|
Known Indirect Subclasses
|
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 ColorStateList? |
Return the tint applied to the background drawable, if specified.
|
abstract Mode? |
Return the blending mode used to apply the tint to the background drawable, if specified.
|
abstract Unit |
Applies a tint to the background drawable.
|
abstract Unit |
Specifies the blending mode used to apply the tint specified by setSupportBackgroundTintList(ColorStateList) } to the background drawable.
|
Public methods
getSupportBackgroundTintList
@Nullable abstract fun getSupportBackgroundTintList(): ColorStateList?
Return the tint applied to the background drawable, if specified.
getSupportBackgroundTintMode
@Nullable abstract fun getSupportBackgroundTintMode(): Mode?
Return the blending mode used to apply the tint to the background drawable, if specified.
Return |
Mode?: the blending mode used to apply the tint to the background drawable |
setSupportBackgroundTintList
abstract fun setSupportBackgroundTintList(@Nullable tint: ColorStateList?): Unit
Applies a tint to the background drawable. Does not modify the current tint mode, which is PorterDuff.Mode#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 |