# TintableBackgroundView

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Methods](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#)  

# TintableBackgroundView

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


interface
TintableBackgroundView
`  
`


`

|------------------------------------------------|
| android.support.v4.view.TintableBackgroundView |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#)Known Indirect Subclasses [AppCompatAutoCompleteTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatAutoCompleteTextView),[AppCompatButton](https://developer.android.com/reference/android/support/v7/widget/AppCompatButton),[AppCompatEditText](https://developer.android.com/reference/android/support/v7/widget/AppCompatEditText),[AppCompatImageButton](https://developer.android.com/reference/android/support/v7/widget/AppCompatImageButton),[AppCompatImageView](https://developer.android.com/reference/android/support/v7/widget/AppCompatImageView),[AppCompatMultiAutoCompleteTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatMultiAutoCompleteTextView),[AppCompatSpinner](https://developer.android.com/reference/android/support/v7/widget/AppCompatSpinner),[AppCompatTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatTextView),[EmojiAppCompatButton](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatButton),[EmojiAppCompatEditText](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatEditText),[EmojiAppCompatTextView](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatTextView) |--------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [AppCompatAutoCompleteTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatAutoCompleteTextView)           | A[AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                 | | [AppCompatButton](https://developer.android.com/reference/android/support/v7/widget/AppCompatButton)                                       | A[Button](https://developer.android.com/reference/android/widget/Button.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                                             | | [AppCompatEditText](https://developer.android.com/reference/android/support/v7/widget/AppCompatEditText)                                   | A[EditText](https://developer.android.com/reference/android/widget/EditText.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                                         | | [AppCompatImageButton](https://developer.android.com/reference/android/support/v7/widget/AppCompatImageButton)                             | A[ImageButton](https://developer.android.com/reference/android/widget/ImageButton.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                                   | | [AppCompatImageView](https://developer.android.com/reference/android/support/v7/widget/AppCompatImageView)                                 | A[ImageView](https://developer.android.com/reference/android/widget/ImageView.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                                       | | [AppCompatMultiAutoCompleteTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatMultiAutoCompleteTextView) | A[MultiAutoCompleteTextView](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.html)which supports compatible features on older version of the platform, including: - Supports[textAllCaps](https://developer.android.com/reference/android/support/v7/appcompat/R.attr#textAllCaps)style attribute which works back to[Gingerbread](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#GINGERBREAD). | | [AppCompatSpinner](https://developer.android.com/reference/android/support/v7/widget/AppCompatSpinner)                                     | A[Spinner](https://developer.android.com/reference/android/widget/Spinner.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[CompoundButtonCompat](https://developer.android.com/reference/android/support/v4/widget/CompoundButtonCompat).                                                                                                     | | [AppCompatTextView](https://developer.android.com/reference/android/support/v7/widget/AppCompatTextView)                                   | A[TextView](https://developer.android.com/reference/android/widget/TextView.html)which supports compatible features on older versions of the platform, including: - Allows dynamic tint of its background via the background tint methods in[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat).                                                                                                                         | | [EmojiAppCompatButton](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatButton)                     | AppCompatButton widget enhanced with emoji capability by using[EmojiTextViewHelper](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiTextViewHelper).                                                                                                                                                                                                                                                                           | | [EmojiAppCompatEditText](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatEditText)                 | AppCompatEditText widget enhanced with emoji capability by using[EmojiEditTextHelper](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiEditTextHelper).                                                                                                                                                                                                                                                                         | | [EmojiAppCompatTextView](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiAppCompatTextView)                 | AppCompatTextView widget enhanced with emoji capability by using[EmojiTextViewHelper](https://developer.android.com/reference/android/support/text/emoji/widget/EmojiTextViewHelper).                                                                                                                                                                                                                                                                         | ||

<br />

*** ** * ** ***

Interface which allows a[View](https://developer.android.com/reference/android/view/View.html)to receive background tinting calls from[ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat)when running on API v20 devices or lower.

## Summary

|                                                                                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                                                                                      ||
|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html) | ` `[getSupportBackgroundTintList](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#getSupportBackgroundTintList())`() ` Return the tint applied to the background drawable, if specified.                                                                                                                                                                                                                                                                                                                                                                              |
| ` abstract `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)  | ` `[getSupportBackgroundTintMode](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#getSupportBackgroundTintMode())`() ` Return the blending mode used to apply the tint to the background drawable, if specified.                                                                                                                                                                                                                                                                                                                                                      |
| ` abstract void`                                                                                              | ` `[setSupportBackgroundTintList](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#setSupportBackgroundTintList(android.content.res.ColorStateList))`(`[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)` tint) ` Applies a tint to the background drawable.                                                                                                                                                                                                                                                           |
| ` abstract void`                                                                                              | ` `[setSupportBackgroundTintMode](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#setSupportBackgroundTintMode(android.graphics.PorterDuff.Mode))`(`[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)` tintMode) ` Specifies the blending mode used to apply the tint specified by[setSupportBackgroundTintList(ColorStateList)](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#setSupportBackgroundTintList(android.content.res.ColorStateList))} to the background drawable. |

## Public methods

### getSupportBackgroundTintList

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
ColorStateList getSupportBackgroundTintList ()
```

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

<br />

|                                                                        Returns                                                                        ||
|---------------------------------------------------------------------------------------------------|----------------------------------------------------|
| [ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html) | the tint applied to the background drawable <br /> |

### getSupportBackgroundTintMode

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
PorterDuff.Mode getSupportBackgroundTintMode ()
```

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

<br />

|                                                                                   Returns                                                                                    ||
|--------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------|
| [PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html) | the blending mode used to apply the tint to the background drawable <br /> |

### setSupportBackgroundTintList

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSupportBackgroundTintList (ColorStateList tint)
```

Applies a tint to the background drawable. Does not modify the current tint mode, which is[SRC_IN](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html#SRC_IN)by default.

Subsequent calls to`View.setBackground(Drawable)`will automatically mutate the drawable and apply the specified tint and tint mode.

<br />

|                                  Parameters                                   ||
|--------|-----------------------------------------------------------------------|
| `tint` | `ColorStateList`: the tint to apply, may be`null`to clear tint <br /> |

**See also:**

- [getSupportBackgroundTintList()](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#getSupportBackgroundTintList())  

### setSupportBackgroundTintMode

added in[version 24.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
void setSupportBackgroundTintMode (PorterDuff.Mode tintMode)
```

Specifies the blending mode used to apply the tint specified by[setSupportBackgroundTintList(ColorStateList)](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#setSupportBackgroundTintList(android.content.res.ColorStateList))} to the background drawable. The default mode is[SRC_IN](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html#SRC_IN).

<br />

|                                                Parameters                                                 ||
|------------|-----------------------------------------------------------------------------------------------|
| `tintMode` | `PorterDuff.Mode`: the blending mode used to apply the tint, may be`null`to clear tint <br /> |

**See also:**

- [getSupportBackgroundTintMode()](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView#getSupportBackgroundTintMode())  
-

  ## Annotations

  - [ViewPager.DecorView](https://developer.android.com/reference/android/support/v4/view/ViewPager.DecorView)
-

  ## Interfaces

  - [ActionProvider.VisibilityListener](https://developer.android.com/reference/android/support/v4/view/ActionProvider.VisibilityListener)
  - [AsyncLayoutInflater.OnInflateFinishedListener](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater.OnInflateFinishedListener)
  - [LayoutInflaterFactory](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterFactory)
  - [MenuItemCompat.OnActionExpandListener](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat.OnActionExpandListener)
  - [NestedScrollingChild](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild)
  - [NestedScrollingChild2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChild2)
  - [NestedScrollingParent](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent)
  - [NestedScrollingParent2](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParent2)
  - [OnApplyWindowInsetsListener](https://developer.android.com/reference/android/support/v4/view/OnApplyWindowInsetsListener)
  - [ScrollingView](https://developer.android.com/reference/android/support/v4/view/ScrollingView)
  - [TintableBackgroundView](https://developer.android.com/reference/android/support/v4/view/TintableBackgroundView)
  - [ViewPager.OnAdapterChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnAdapterChangeListener)
  - [ViewPager.OnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.OnPageChangeListener)
  - [ViewPager.PageTransformer](https://developer.android.com/reference/android/support/v4/view/ViewPager.PageTransformer)
  - [ViewPropertyAnimatorListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListener)
  - [ViewPropertyAnimatorUpdateListener](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorUpdateListener)
-

  ## Classes

  - [AbsSavedState](https://developer.android.com/reference/android/support/v4/view/AbsSavedState)
  - [AccessibilityDelegateCompat](https://developer.android.com/reference/android/support/v4/view/AccessibilityDelegateCompat)
  - [ActionProvider](https://developer.android.com/reference/android/support/v4/view/ActionProvider)
  - [AsyncLayoutInflater](https://developer.android.com/reference/android/support/v4/view/AsyncLayoutInflater)
  - [GestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/GestureDetectorCompat)
  - [GravityCompat](https://developer.android.com/reference/android/support/v4/view/GravityCompat)
  - [InputDeviceCompat](https://developer.android.com/reference/android/support/v4/view/InputDeviceCompat)
  - [LayoutInflaterCompat](https://developer.android.com/reference/android/support/v4/view/LayoutInflaterCompat)
  - [MarginLayoutParamsCompat](https://developer.android.com/reference/android/support/v4/view/MarginLayoutParamsCompat)
  - [MenuCompat](https://developer.android.com/reference/android/support/v4/view/MenuCompat)
  - [MenuItemCompat](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat)
  - [MotionEventCompat](https://developer.android.com/reference/android/support/v4/view/MotionEventCompat)
  - [NestedScrollingChildHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingChildHelper)
  - [NestedScrollingParentHelper](https://developer.android.com/reference/android/support/v4/view/NestedScrollingParentHelper)
  - [PagerAdapter](https://developer.android.com/reference/android/support/v4/view/PagerAdapter)
  - [PagerTabStrip](https://developer.android.com/reference/android/support/v4/view/PagerTabStrip)
  - [PagerTitleStrip](https://developer.android.com/reference/android/support/v4/view/PagerTitleStrip)
  - [PointerIconCompat](https://developer.android.com/reference/android/support/v4/view/PointerIconCompat)
  - [ScaleGestureDetectorCompat](https://developer.android.com/reference/android/support/v4/view/ScaleGestureDetectorCompat)
  - [VelocityTrackerCompat](https://developer.android.com/reference/android/support/v4/view/VelocityTrackerCompat)
  - [ViewCompat](https://developer.android.com/reference/android/support/v4/view/ViewCompat)
  - [ViewConfigurationCompat](https://developer.android.com/reference/android/support/v4/view/ViewConfigurationCompat)
  - [ViewGroupCompat](https://developer.android.com/reference/android/support/v4/view/ViewGroupCompat)
  - [ViewPager](https://developer.android.com/reference/android/support/v4/view/ViewPager)
  - [ViewPager.LayoutParams](https://developer.android.com/reference/android/support/v4/view/ViewPager.LayoutParams)
  - [ViewPager.SavedState](https://developer.android.com/reference/android/support/v4/view/ViewPager.SavedState)
  - [ViewPager.SimpleOnPageChangeListener](https://developer.android.com/reference/android/support/v4/view/ViewPager.SimpleOnPageChangeListener)
  - [ViewParentCompat](https://developer.android.com/reference/android/support/v4/view/ViewParentCompat)
  - [ViewPropertyAnimatorCompat](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorCompat)
  - [ViewPropertyAnimatorListenerAdapter](https://developer.android.com/reference/android/support/v4/view/ViewPropertyAnimatorListenerAdapter)
  - [WindowCompat](https://developer.android.com/reference/android/support/v4/view/WindowCompat)
  - [WindowInsetsCompat](https://developer.android.com/reference/android/support/v4/view/WindowInsetsCompat)