# TintableCompoundDrawablesView

# TintableCompoundDrawablesView

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/widget/TintableCompoundDrawablesView.java+class:androidx.core.widget.TintableCompoundDrawablesView)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView "View this page in Java")

<br />

```
interface TintableCompoundDrawablesView
```

<br />

Known direct subclasses  
[AppCompatAutoCompleteTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatAutoCompleteTextView),[AppCompatButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatButton),[AppCompatCheckBox](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatCheckBox),[AppCompatCheckedTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatCheckedTextView),[AppCompatEditText](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatEditText),[AppCompatMultiAutoCompleteTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView),[AppCompatRadioButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatRadioButton),[AppCompatTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatTextView),[AppCompatToggleButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatToggleButton)  

|---------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AppCompatAutoCompleteTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatAutoCompleteTextView)           | A[AutoCompleteTextView](https://developer.android.com/reference/android/widget/AutoCompleteTextView.html)which supports compatible features on older versions of the platform, including:          |
| [AppCompatButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatButton)                                       | A[Button](https://developer.android.com/reference/android/widget/Button.html)which supports compatible features on older versions of the platform, including:                                      |
| [AppCompatCheckBox](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatCheckBox)                                   | A[CheckBox](https://developer.android.com/reference/android/widget/CheckBox.html)which supports compatible features on older versions of the platform, including:                                  |
| [AppCompatCheckedTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatCheckedTextView)                     | A[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)which supports compatible features on older versions of the platform, including:                    |
| [AppCompatEditText](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatEditText)                                   | A[EditText](https://developer.android.com/reference/android/widget/EditText.html)which supports compatible features on older versions of the platform, including:                                  |
| [AppCompatMultiAutoCompleteTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView) | A[MultiAutoCompleteTextView](https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.html)which supports compatible features on older version of the platform, including: |
| [AppCompatRadioButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatRadioButton)                             | A[RadioButton](https://developer.android.com/reference/android/widget/RadioButton.html)which supports compatible features on older versions of the platform, including:                            |
| [AppCompatTextView](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatTextView)                                   | A[TextView](https://developer.android.com/reference/android/widget/TextView.html)which supports compatible features on older versions of the platform, including:                                  |
| [AppCompatToggleButton](https://developer.android.com/reference/kotlin/androidx/appcompat/widget/AppCompatToggleButton)                           | A[ToggleButton](https://developer.android.com/reference/android/widget/ToggleButton.html)which supports compatible features on older versions of the platform, including:                          |

Known indirect subclasses  
[EmojiAppCompatButton](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatButton),[EmojiAppCompatEditText](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatEditText),[EmojiAppCompatTextView](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatTextView),[GuidedActionAppCompatEditText](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionAppCompatEditText),[MotionButton](https://developer.android.com/reference/kotlin/androidx/constraintlayout/utils/widget/MotionButton)  

|----------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [EmojiAppCompatButton](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatButton)                      | AppCompatButton widget enhanced with emoji capability by using[EmojiTextViewHelper](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiTextViewHelper).   |
| [EmojiAppCompatEditText](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatEditText)                  | AppCompatEditText widget enhanced with emoji capability by using[EmojiEditTextHelper](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiEditTextHelper). |
| [EmojiAppCompatTextView](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiAppCompatTextView)                  | AppCompatTextView widget enhanced with emoji capability by using[EmojiTextViewHelper](https://developer.android.com/reference/kotlin/androidx/emoji/widget/EmojiTextViewHelper). |
| [GuidedActionAppCompatEditText](https://developer.android.com/reference/kotlin/androidx/leanback/widget/GuidedActionAppCompatEditText) | A custom EditText that satisfies the IME key monitoring requirements of GuidedStepFragment.                                                                                      |
| [MotionButton](https://developer.android.com/reference/kotlin/androidx/constraintlayout/utils/widget/MotionButton)                     | A MotionButton is an AppCompatButton that can round its edges.                                                                                                                   |

*** ** * ** ***

Interface which allows[android.widget.TextView](https://developer.android.com/reference/android/widget/TextView.html)and subclasses to tint compound drawables with[TextViewCompat](https://developer.android.com/reference/kotlin/androidx/core/widget/TextViewCompat)when running on API v22 devices or lower.

## Summary

|                                         ### Public functions                                         |
|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?` | [getSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintList())`()` Return the tint applied to the compound drawables, if specified.                                                                                                                                                                                                                                                                                                                                                                                       |
| [PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?`  | [getSupportCompoundDrawablesTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintMode())`()` Returns the blending mode used to apply the tint to the compound drawables, if specified.                                                                                                                                                                                                                                                                                                                                                              |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList))`(tint: `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?)` Applies a tint to the compound drawables.                                                                                                                                                                                                                                                                  |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setSupportCompoundDrawablesTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintMode(android.graphics.PorterDuff.Mode))`(tintMode: `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?)` Specifies the blending mode used to apply the tint specified by[setSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList))to the compound drawables. |

## Public functions

### getSupportCompoundDrawablesTintList

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getSupportCompoundDrawablesTintList(): ColorStateList?
```

Return the tint applied to the compound drawables, if specified.  

|                                               Returns                                                |
|------------------------------------------------------------------------------------------------------|--------------------------------------------|
| [ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?` | the tint applied to the compound drawables |

### getSupportCompoundDrawablesTintMode

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getSupportCompoundDrawablesTintMode(): PorterDuff.Mode?
```

Returns the blending mode used to apply the tint to the compound drawables, if specified.  

|                                               Returns                                               |
|-----------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?` | the blending mode used to apply the tint to the compound drawables |

|                                                                                                    See also                                                                                                    |
|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setSupportCompoundDrawablesTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintMode(android.graphics.PorterDuff.Mode)) |   |

### setSupportCompoundDrawablesTintList

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setSupportCompoundDrawablesTintList(tint: ColorStateList?): Unit
```

Applies a tint to the compound drawables. 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 setCompoundDrawables and related methods will automatically mutate the drawables and apply the specified tint and tint mode.  

|                                                  Parameters                                                  |
|--------------------------------------------------------------------------------------------------------------|----------------------------------------------|
| `tint: `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?` | the tint to apply, may be`null`to clear tint |

|                                                                                    See also                                                                                    |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintList()) |   |

### setSupportCompoundDrawablesTintMode

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun setSupportCompoundDrawablesTintMode(tintMode: PorterDuff.Mode?): Unit
```

Specifies the blending mode used to apply the tint specified by[setSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList))to the compound drawables. The default mode is[SRC_IN](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html#SRC_IN).  

|                                                   Parameters                                                    |
|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| `tintMode: `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?` | the blending mode used to apply the tint, may be`null`to clear tint |

|                                                                                                     See also                                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getSupportCompoundDrawablesTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintMode())                                   |   |
| [setSupportCompoundDrawablesTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList)) |   |