Stay organized with collections Save and categorize content based on your preferences.

ImageViewCompat

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

public static @Nullable ColorStateList getImageTintList(@NonNull ImageView view)

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

getImageTintMode

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

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

Applies a tint to the image drawable.

setImageTintMode

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.