# CheckedTextViewCompat

# CheckedTextViewCompat

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

*** ** * ** ***

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

<br />

```
class CheckedTextViewCompat
```

<br />

*** ** * ** ***

Helper for accessing[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html).

## Summary

|                                                ### Public functions                                                |
|--------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html)`?`       | `@`[ReplaceWith](https://developer.android.com/reference/kotlin/androidx/annotation/ReplaceWith)`(expression = "textView.getCheckMarkDrawable()")` ~~[getCheckMarkDrawable](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#getCheckMarkDrawable(android.widget.CheckedTextView))~~`(textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)`)` **This function is deprecated.** Call[getCheckMarkDrawable](https://developer.android.com/reference/android/widget/CheckedTextView.html#getCheckMarkDrawable())directly. <br />                                                                                                                          |
| `java-static `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?` | [getCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#getCheckMarkTintList(android.widget.CheckedTextView))`(textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)`)` Returns the tint applied to the check mark drawable                                                                                                                                                                                                                                                                                                                                                                                                             |
| `java-static `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?`  | [getCheckMarkTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#getCheckMarkTintMode(android.widget.CheckedTextView))`(textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)`)` name android:checkMarkTintMode                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintList(android.widget.CheckedTextView,android.content.res.ColorStateList))`(textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)`, tint: `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?)` Applies a tint to the check mark drawable.                                                                                                                                                                                                                                                                       |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setCheckMarkTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintMode(android.widget.CheckedTextView,android.graphics.PorterDuff.Mode))`(` ` textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)`,` ` tintMode: `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?` `)` Specifies the blending mode used to apply the tint specified by[setCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintList(android.widget.CheckedTextView,android.content.res.ColorStateList))} to the check mark drawable. |

## Public functions

### getCheckMarkDrawable

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

```
@ReplaceWith(expression = "textView.getCheckMarkDrawable()")
java-static fun [getCheckMarkDrawable](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#getCheckMarkDrawable(android.widget.CheckedTextView))(textView: CheckedTextView): Drawable?
```
| **This function is deprecated.**   
|
| Call[getCheckMarkDrawable](https://developer.android.com/reference/android/widget/CheckedTextView.html#getCheckMarkDrawable())directly.

Returns the drawable used as the check mark image  

|                                                                           See also                                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setCheckMarkDrawable](https://developer.android.com/reference/android/widget/CheckedTextView.html#setCheckMarkDrawable(android.graphics.drawable.Drawable)) |   |

### getCheckMarkTintList

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

```
java-static fun getCheckMarkTintList(textView: CheckedTextView): ColorStateList?
```

Returns the tint applied to the check mark drawable  

|                                                                                                 See also                                                                                                  |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintList(android.widget.CheckedTextView,android.content.res.ColorStateList)) |   |

### getCheckMarkTintMode

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

```
java-static fun getCheckMarkTintMode(textView: CheckedTextView): PorterDuff.Mode?
```

name android:checkMarkTintMode  

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

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

### setCheckMarkTintList

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

```
java-static fun setCheckMarkTintList(textView: CheckedTextView, tint: ColorStateList?): Unit
```

Applies a tint to the check mark 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[setCheckMarkDrawable](https://developer.android.com/reference/android/widget/CheckedTextView.html#setCheckMarkDrawable(android.graphics.drawable.Drawable))should automatically mutate the drawable and apply the specified tint and tint mode using[setTintList](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/DrawableCompat#setTintList(android.graphics.drawable.Drawable,android.content.res.ColorStateList)).  

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

|                                                                                                 See also                                                                                                  |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintList(android.widget.CheckedTextView,android.content.res.ColorStateList)) |   |

### setCheckMarkTintMode

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

```
java-static fun setCheckMarkTintMode(
    textView: CheckedTextView,
    tintMode: PorterDuff.Mode?
): Unit
```

Specifies the blending mode used to apply the tint specified by[setCheckMarkTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#setCheckMarkTintList(android.widget.CheckedTextView,android.content.res.ColorStateList))} to the check mark drawable. The default mode is[SRC_IN](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html#SRC_IN).  

|                                                   Parameters                                                    |
|-----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------|
| `textView: `[CheckedTextView](https://developer.android.com/reference/android/widget/CheckedTextView.html)      | CheckedTextView for which to apply the tint mode.                   |
| `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                                                                                            |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getCheckMarkTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/CheckedTextViewCompat#getCheckMarkTintMode(android.widget.CheckedTextView))                        |   |
| [setTintMode](https://developer.android.com/reference/kotlin/androidx/core/graphics/drawable/DrawableCompat#setTintMode(android.graphics.drawable.Drawable,android.graphics.PorterDuff.Mode)) |   |