ImageViewCompat

Added in 1.1.0

public class ImageViewCompat


Helper for accessing features in ImageView.

Summary

Public methods

static @Nullable ColorStateList

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

static @Nullable PorterDuff.Mode

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

static void
setImageTintList(
    @NonNull ImageView view,
    @Nullable ColorStateList tintList
)

Applies a tint to the image drawable.

static void

Specifies the blending mode used to apply the tint specified by setImageTintList to the image drawable.

Public methods

getImageTintList

Added in 1.1.0
public static @Nullable ColorStateList getImageTintList(@NonNull ImageView view)

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

getImageTintMode

Added in 1.1.0
public static @Nullable PorterDuff.Mode getImageTintMode(@NonNull ImageView view)

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

setImageTintList

Added in 1.1.0
public static void setImageTintList(
    @NonNull ImageView view,
    @Nullable ColorStateList tintList
)

Applies a tint to the image drawable.

setImageTintMode

Added in 1.1.0
public static void setImageTintMode(@NonNull ImageView view, @Nullable PorterDuff.Mode mode)

Specifies the blending mode used to apply the tint specified by setImageTintList to the image drawable. The default mode is SRC_IN.