# 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)

*** ** * ** ***


```
public interface TintableCompoundDrawablesView
```

<br />

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

|---|---|
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatAutoCompleteTextView` | A `https://developer.android.com/reference/android/widget/AutoCompleteTextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatButton` | A `https://developer.android.com/reference/android/widget/Button.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckBox` | A `https://developer.android.com/reference/android/widget/CheckBox.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatCheckedTextView` | A `https://developer.android.com/reference/android/widget/CheckedTextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatEditText` | A `https://developer.android.com/reference/android/widget/EditText.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatMultiAutoCompleteTextView` | A `https://developer.android.com/reference/android/widget/MultiAutoCompleteTextView.html` which supports compatible features on older version of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatRadioButton` | A `https://developer.android.com/reference/android/widget/RadioButton.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatTextView` | A `https://developer.android.com/reference/android/widget/TextView.html` which supports compatible features on older versions of the platform, including: |
| `https://developer.android.com/reference/androidx/appcompat/widget/AppCompatToggleButton` | A `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/androidx/emoji/widget/EmojiAppCompatButton), [EmojiAppCompatEditText](https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatEditText), [EmojiAppCompatTextView](https://developer.android.com/reference/androidx/emoji/widget/EmojiAppCompatTextView), [GuidedActionAppCompatEditText](https://developer.android.com/reference/androidx/leanback/widget/GuidedActionAppCompatEditText), [MotionButton](https://developer.android.com/reference/androidx/constraintlayout/utils/widget/MotionButton)

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

*** ** * ** ***

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

## Summary

| ### Public methods |
|---|---|
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/ColorStateList.html` | `https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintList()()` Return the tint applied to the compound drawables, if specified. |
| `abstract @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` | `https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView#getSupportCompoundDrawablesTintMode()()` Returns the blending mode used to apply the tint to the compound drawables, if specified. |
| `abstract void` | `https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/ColorStateList.html tint)` Applies a tint to the compound drawables. |
| `abstract void` | `https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintMode(android.graphics.PorterDuff.Mode)(@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` Specifies the blending mode used to apply the tint specified by `https://developer.android.com/reference/androidx/core/widget/TintableCompoundDrawablesView#setSupportCompoundDrawablesTintList(android.content.res.ColorStateList)` to the compound drawables. |

## Public methods

### getSupportCompoundDrawablesTintList

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

```
abstract @Nullable ColorStateList getSupportCompoundDrawablesTintList()
```

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

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html 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)

```
abstract @Nullable PorterDuff.Mode getSupportCompoundDrawablesTintMode()
```

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

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html` | the blending mode used to apply the tint to the compound drawables |

| See also |
|---|---|
| `https://developer.android.com/reference/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)

```
abstract void setSupportCompoundDrawablesTintList(@Nullable ColorStateList tint)
```

Applies a tint to the compound drawables. Does not modify the current tint mode, which is `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 |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/ColorStateList.html tint` | the tint to apply, may be `null` to clear tint |

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

### setSupportCompoundDrawablesTintMode

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

```
abstract void setSupportCompoundDrawablesTintMode(@Nullable PorterDuff.Mode tintMode)
```

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

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode` | the blending mode used to apply the tint, may be `null` to clear tint |

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