# ImageViewCompat

# ImageViewCompat

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/widget/ImageViewCompat.java+class:androidx.core.widget.ImageViewCompat)  
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/ImageViewCompat "View this page in Java")

<br />

```
class ImageViewCompat
```

<br />

*** ** * ** ***

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

## Summary

|                                                ### Public functions                                                |
|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `java-static `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?` | [getImageTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/ImageViewCompat#getImageTintList(android.widget.ImageView))`(view: `[ImageView](https://developer.android.com/reference/android/widget/ImageView.html)`)` Return the tint applied to the image drawable, if specified.                                                                                                                                                                                                                                                                                                                                                           |
| `java-static `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?`  | [getImageTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/ImageViewCompat#getImageTintMode(android.widget.ImageView))`(view: `[ImageView](https://developer.android.com/reference/android/widget/ImageView.html)`)` Return the blending mode used to apply the tint to the image drawable, if specified.                                                                                                                                                                                                                                                                                                                                   |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setImageTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/ImageViewCompat#setImageTintList(android.widget.ImageView,android.content.res.ColorStateList))`(view: `[ImageView](https://developer.android.com/reference/android/widget/ImageView.html)`, tintList: `[ColorStateList](https://developer.android.com/reference/android/content/res/ColorStateList.html)`?)` Applies a tint to the image drawable.                                                                                                                                                                                                                               |
| `java-static `[Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                        | [setImageTintMode](https://developer.android.com/reference/kotlin/androidx/core/widget/ImageViewCompat#setImageTintMode(android.widget.ImageView,android.graphics.PorterDuff.Mode))`(view: `[ImageView](https://developer.android.com/reference/android/widget/ImageView.html)`, mode: `[PorterDuff.Mode](https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html)`?)` Specifies the blending mode used to apply the tint specified by[setImageTintList](https://developer.android.com/reference/kotlin/androidx/core/widget/ImageViewCompat#setImageTintList(android.widget.ImageView,android.content.res.ColorStateList))to the image drawable. |

## Public functions

### getImageTintList

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

```
java-static fun getImageTintList(view: ImageView): ColorStateList?
```

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

### getImageTintMode

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

```
java-static fun getImageTintMode(view: ImageView): PorterDuff.Mode?
```

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

### setImageTintList

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

```
java-static fun setImageTintList(view: ImageView, tintList: ColorStateList?): Unit
```

Applies a tint to the image drawable.  

### setImageTintMode

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

```
java-static fun setImageTintMode(view: ImageView, mode: PorterDuff.Mode?): Unit
```

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