Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.
added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.1.0-alpha01

ImageViewCompat

public class ImageViewCompat
extends Object

java.lang.Object
   ↳ androidx.core.widget.ImageViewCompat


Helper for accessing features in ImageView.

Summary

Public methods

static ColorStateList getImageTintList(ImageView view)

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

static PorterDuff.Mode getImageTintMode(ImageView view)

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

static void setImageTintList(ImageView view, ColorStateList tintList)

Applies a tint to the image drawable.

static void setImageTintMode(ImageView view, PorterDuff.Mode mode)

Specifies the blending mode used to apply the tint specified by setImageTintList(android.widget.ImageView, android.content.res.ColorStateList) to the image drawable.

Inherited methods

Public methods

getImageTintList

added in version 1.0.0
public static ColorStateList getImageTintList (ImageView view)

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

Parameters
view ImageView

Returns
ColorStateList

getImageTintMode

added in version 1.0.0
public static PorterDuff.Mode getImageTintMode (ImageView view)

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

Parameters
view ImageView

Returns
PorterDuff.Mode

setImageTintList

added in version 1.0.0
public static void setImageTintList (ImageView view, 
                ColorStateList tintList)

Applies a tint to the image drawable.

Parameters
view ImageView

tintList ColorStateList

setImageTintMode

added in version 1.0.0
public static void setImageTintMode (ImageView view, 
                PorterDuff.Mode mode)

Specifies the blending mode used to apply the tint specified by setImageTintList(android.widget.ImageView, android.content.res.ColorStateList) to the image drawable. The default mode is PorterDuff.Mode.SRC_IN.

Parameters
view ImageView

mode PorterDuff.Mode