Added in API level 1

ImageView

open class ImageView : View
kotlin.Any
   ↳ android.view.View
   ↳ android.widget.ImageView

Displays image resources, for example android.graphics.Bitmap or android.graphics.drawable.Drawable resources. ImageView is also commonly used to apply tints to an image and handle image scaling.

The following XML snippet is a common example of using an ImageView to display an image resource:

<LinearLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent">
      <ImageView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/my_image"
          android:contentDescription="@string/my_image_description"
          />
  </LinearLayout>
  

To learn more about Drawables, see: Drawable Resources. To learn more about working with Bitmaps, see: Handling Bitmaps.

Summary

Nested classes

Options for scaling the bounds of an image to the bounds of this view.

XML attributes
android:adjustViewBounds Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.
android:cropToPadding If true, the image will be cropped to fit within its padding.
android:maxHeight An optional argument to supply a maximum height for this view.
android:maxWidth An optional argument to supply a maximum width for this view.
android:scaleType Controls how the image should be resized or moved to match the size of this ImageView.
android:src Sets a drawable as the content of this ImageView.
android:tint The tinting color for the image.
Inherited XML attributes
Inherited constants
Public constructors
ImageView(context: Context!)

ImageView(context: Context!, attrs: AttributeSet?)

ImageView(context: Context!, attrs: AttributeSet?, defStyleAttr: Int)

ImageView(context: Context!, attrs: AttributeSet?, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit

Applies a temporary transformation Matrix to the view's drawable when it is drawn.

Unit

Removes the image's android.graphics.ColorFilter.

open Unit

open CharSequence!

open Boolean

True when ImageView is adjusting its bounds to preserve the aspect ratio of its drawable

open Int

Return the offset of the widget's text baseline from the widget's top boundary.

open Boolean

Checks whether this view's baseline is considered the bottom of the view.

open ColorFilter!

Returns the active color filter for this ImageView.

open Boolean

Return whether this ImageView crops to padding.

open Drawable!

Gets the current Drawable, or null if no Drawable has been assigned.

open Int

Returns the alpha that will be applied to the drawable of this ImageView.

open Matrix!

Returns the view's optional matrix.

open BlendMode?

Gets the blending mode used to apply the tint to the image Drawable

open ColorStateList?

Get the current android.content.res.ColorStateList used to tint the image Drawable, or null if no tint is applied.

open PorterDuff.Mode?

Gets the blending mode used to apply the tint to the image Drawable

open Int

The maximum height of this view.

open Int

The maximum width of this view.

open ImageView.ScaleType!

Returns the current ScaleType that is used to scale the bounds of an image to the bounds of the ImageView.

open Boolean

open Unit

Invalidates the specified Drawable.

open Boolean

open Unit

open IntArray!

open Unit
onRtlPropertiesChanged(layoutDirection: Int)

open Unit

open Unit
setAdjustViewBounds(adjustViewBounds: Boolean)

Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.

open Unit
setAlpha(alpha: Int)

Sets the alpha value that should be applied to the image.

open Unit
setBaseline(baseline: Int)

Set the offset of the widget's text baseline from the widget's top boundary.

open Unit

Sets whether the baseline of this view to the bottom of the view.

Unit

Sets a tinting option for the image.

Unit

Set a tinting option for the image.

open Unit

Apply an arbitrary colorfilter to the image.

open Unit
setCropToPadding(cropToPadding: Boolean)

Sets whether this ImageView will crop to padding.

open Unit

Sets the alpha value that should be applied to the image.

open Unit

Sets a Bitmap as the content of this ImageView.

open Unit

Sets a drawable as the content of this ImageView.

open Unit

Sets the content of this ImageView to the specified Icon.

open Unit

Sets the image level, when it is constructed from a android.graphics.drawable.LevelListDrawable.

open Unit

Adds a transformation Matrix that is applied to the view's drawable when it is drawn.

open Unit

Sets a drawable as the content of this ImageView.

open Unit
setImageState(state: IntArray!, merge: Boolean)

Set the state of the current android.graphics.drawable.StateListDrawable.

open Unit

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

open Unit

Applies a tint to the image drawable.

open Unit

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

open Unit

Sets the content of this ImageView to the specified Uri.

open Unit
setMaxHeight(maxHeight: Int)

An optional argument to supply a maximum height for this view.

open Unit
setMaxWidth(maxWidth: Int)

An optional argument to supply a maximum width for this view.

open Unit

Controls how the image should be resized or moved to match the size of this ImageView.

open Unit
setSelected(selected: Boolean)

open Unit
setVisibility(visibility: Int)

Protected methods
open Unit

open Unit

open Unit

open Unit
onDraw(canvas: Canvas)

open Unit
onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int)

open Boolean
setFrame(l: Int, t: Int, r: Int, b: Int)

open Boolean

If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying.

Inherited functions
Inherited properties

XML attributes

android:adjustViewBounds

android:adjustViewBounds
Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.

May be a boolean value, such as "true" or "false".

android:cropToPadding

android:cropToPadding
If true, the image will be cropped to fit within its padding.

May be a boolean value, such as "true" or "false".

android:maxHeight

android:maxHeight
An optional argument to supply a maximum height for this view. See {see android.widget.ImageView#setMaxHeight} for details.

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

android:maxWidth

android:maxWidth
An optional argument to supply a maximum width for this view. See {see android.widget.ImageView#setMaxWidth} for details.

May be a dimension value, which is a floating point number appended with a unit such as "14.5sp". Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), and mm (millimeters).

android:scaleType

android:scaleType
Controls how the image should be resized or moved to match the size of this ImageView. See android.widget.ImageView.ScaleType

Must be one of the following constant values.

Constant Value Description
center 5 Center the image in the view, but perform no scaling.
centerCrop 6 Scale the image uniformly (maintain the image's aspect ratio) so both dimensions (width and height) of the image will be equal to or larger than the corresponding dimension of the view (minus padding). The image is then centered in the view.
centerInside 7 Scale the image uniformly (maintain the image's aspect ratio) so that both dimensions (width and height) of the image will be equal to or less than the corresponding dimension of the view (minus padding). The image is then centered in the view.
fitCenter 3 Scale the image using android.graphics.Matrix.ScaleToFit#CENTER.
fitEnd 4 Scale the image using android.graphics.Matrix.ScaleToFit#END.
fitStart 2 Scale the image using android.graphics.Matrix.ScaleToFit#START.
fitXY 1 Scale the image using android.graphics.Matrix.ScaleToFit#FILL.
matrix 0 Scale using the image matrix when drawing. See android.widget.ImageView#setImageMatrix(Matrix).

android:src

android:src
Sets a drawable as the content of this ImageView.

May be a reference to another resource, in the form "@[+][package:]type/name" or a theme attribute in the form "?[package:]type/name".

May be a color value, in the form of "rgb", "argb", "rrggbb", or "aarrggbb".

android:tint

android:tint
The tinting color for the image. By default, the tint will blend using SRC_ATOP mode. Please note that for compatibility reasons, this is NOT consistent with the default SRC_IN tint mode used by android.widget.ImageView#setImageTintList and by similar tint attributes on other views.

May be a color value, in the form of "rgb", "argb", "rrggbb", or "aarrggbb".

Public constructors

ImageView

Added in API level 1
ImageView(context: Context!)

ImageView

Added in API level 1
ImageView(
    context: Context!,
    attrs: AttributeSet?)
Parameters
attrs AttributeSet?: This value may be null.

ImageView

Added in API level 1
ImageView(
    context: Context!,
    attrs: AttributeSet?,
    defStyleAttr: Int)
Parameters
attrs AttributeSet?: This value may be null.

ImageView

Added in API level 1
ImageView(
    context: Context!,
    attrs: AttributeSet?,
    defStyleAttr: Int,
    defStyleRes: Int)
Parameters
attrs AttributeSet?: This value may be null.

Public methods

animateTransform

Added in API level 29
open fun animateTransform(matrix: Matrix?): Unit

Applies a temporary transformation Matrix to the view's drawable when it is drawn. Allows custom scaling, translation, and perspective distortion during an animation. This method is a lightweight analogue of ImageView#setImageMatrix(Matrix) to use only during animations as this matrix will be cleared after the next drawable update or view's bounds change.

Parameters
matrix Matrix?: The transformation parameters in matrix form. This value may be null.

clearColorFilter

Added in API level 1
fun clearColorFilter(): Unit

Removes the image's android.graphics.ColorFilter.

drawableHotspotChanged

Added in API level 21
open fun drawableHotspotChanged(
    x: Float,
    y: Float
): Unit
Parameters
x Float: hotspot x coordinate
y Float: hotspot y coordinate

getAccessibilityClassName

Added in API level 23
open fun getAccessibilityClassName(): CharSequence!

getAdjustViewBounds

Added in API level 16
open fun getAdjustViewBounds(): Boolean

True when ImageView is adjusting its bounds to preserve the aspect ratio of its drawable

Return
Boolean whether to adjust the bounds of this view to preserve the original aspect ratio of the drawable

getBaseline

Added in API level 1
open fun getBaseline(): Int

Return the offset of the widget's text baseline from the widget's top boundary.

Return
Int the offset of the baseline within the widget's bounds or -1 if baseline alignment is not supported.

getBaselineAlignBottom

Added in API level 11
open fun getBaselineAlignBottom(): Boolean

Checks whether this view's baseline is considered the bottom of the view.

Return
Boolean True if the ImageView's baseline is considered the bottom of the view, false if otherwise.

getColorFilter

Added in API level 16
open fun getColorFilter(): ColorFilter!

Returns the active color filter for this ImageView.

Return
ColorFilter! the active color filter for this ImageView

getCropToPadding

Added in API level 16
open fun getCropToPadding(): Boolean

Return whether this ImageView crops to padding.

Return
Boolean whether this ImageView crops to padding

getDrawable

Added in API level 1
open fun getDrawable(): Drawable!

Gets the current Drawable, or null if no Drawable has been assigned.

Return
Drawable! the view's drawable, or null if no drawable has been assigned.

getImageAlpha

Added in API level 16
open fun getImageAlpha(): Int

Returns the alpha that will be applied to the drawable of this ImageView.

Return
Int the alpha value that will be applied to the drawable of this ImageView (between 0 and 255 inclusive, with 0 being transparent and 255 being opaque)

getImageMatrix

Added in API level 1
open fun getImageMatrix(): Matrix!

Returns the view's optional matrix. This is applied to the view's drawable when it is drawn. If there is no matrix, this method will return an identity matrix. Do not change this matrix in place but make a copy. If you want a different matrix applied to the drawable, be sure to call setImageMatrix().

getImageTintBlendMode

Added in API level 29
open fun getImageTintBlendMode(): BlendMode?

Gets the blending mode used to apply the tint to the image Drawable

Return
BlendMode? the blending mode used to apply the tint to the image Drawable This value may be null.

getImageTintList

Added in API level 21
open fun getImageTintList(): ColorStateList?

Get the current android.content.res.ColorStateList used to tint the image Drawable, or null if no tint is applied.

Return
ColorStateList? the tint applied to the image drawable

getImageTintMode

Added in API level 21
open fun getImageTintMode(): PorterDuff.Mode?

Gets the blending mode used to apply the tint to the image Drawable

Return
PorterDuff.Mode? the blending mode used to apply the tint to the image Drawable This value may be null.

getMaxHeight

Added in API level 16
open fun getMaxHeight(): Int

The maximum height of this view.

Return
Int The maximum height of this view

getMaxWidth

Added in API level 16
open fun getMaxWidth(): Int

The maximum width of this view.

Return
Int The maximum width of this view

getScaleType

Added in API level 1
open fun getScaleType(): ImageView.ScaleType!

Returns the current ScaleType that is used to scale the bounds of an image to the bounds of the ImageView.

Return
ImageView.ScaleType! The ScaleType used to scale the image.

hasOverlappingRendering

Added in API level 16
open fun hasOverlappingRendering(): Boolean
Return
Boolean true if the content in this view might overlap, false otherwise.

invalidateDrawable

Added in API level 1
open fun invalidateDrawable(dr: Drawable): Unit

Invalidates the specified Drawable.

Parameters
who The drawable that is requesting the update. This value cannot be null.
drawable the drawable to invalidate This value cannot be null.
dr Drawable: This value cannot be null.

isOpaque

Added in API level 7
open fun isOpaque(): Boolean
Return
Boolean True if this View is guaranteed to be fully opaque, false otherwise.

jumpDrawablesToCurrentState

Added in API level 11
open fun jumpDrawablesToCurrentState(): Unit

onCreateDrawableState

Added in API level 1
open fun onCreateDrawableState(extraSpace: Int): IntArray!
Parameters
extraSpace Int: if non-zero, this is the number of extra entries you would like in the returned array in which you can place your own states.
Return
IntArray! Returns an array holding the current Drawable state of the view.

onRtlPropertiesChanged

Added in API level 17
open fun onRtlPropertiesChanged(layoutDirection: Int): Unit
Parameters
layoutDirection Int: the direction of the layout Value is android.view.View#LAYOUT_DIRECTION_LTR, or android.view.View#LAYOUT_DIRECTION_RTL

onVisibilityAggregated

Added in API level 24
open fun onVisibilityAggregated(isVisible: Boolean): Unit
Parameters
isVisible Boolean: true if this view and all of its ancestors are VISIBLE and this view's window is also visible

setAdjustViewBounds

Added in API level 1
open fun setAdjustViewBounds(adjustViewBounds: Boolean): Unit

Set this to true if you want the ImageView to adjust its bounds to preserve the aspect ratio of its drawable.

Note: If the application targets API level 17 or lower, adjustViewBounds will allow the drawable to shrink the view bounds, but not grow to fill available measured space in all cases. This is for compatibility with legacy MeasureSpec and RelativeLayout behavior.

Parameters
adjustViewBounds Boolean: Whether to adjust the bounds of this view to preserve the original aspect ratio of the drawable.

setAlpha

Added in API level 1
Deprecated in API level 16
open fun setAlpha(alpha: Int): Unit

Deprecated: use #setImageAlpha(int) instead

Sets the alpha value that should be applied to the image.

Parameters
alpha Int: the alpha value that should be applied to the image

setBaseline

Added in API level 11
open fun setBaseline(baseline: Int): Unit

Set the offset of the widget's text baseline from the widget's top boundary. This value is overridden by the setBaselineAlignBottom(boolean) property.

Parameters
baseline Int: The baseline to use, or -1 if none is to be provided.

setBaselineAlignBottom

Added in API level 11
open fun setBaselineAlignBottom(aligned: Boolean): Unit

Sets whether the baseline of this view to the bottom of the view. Setting this value overrides any calls to setBaseline.

Parameters
aligned Boolean: If true, the image view will be baseline aligned by its bottom edge.

setColorFilter

Added in API level 1
fun setColorFilter(
    color: Int,
    mode: PorterDuff.Mode!
): Unit

Sets a tinting option for the image.

Parameters
color Int: Color tint to apply.
mode PorterDuff.Mode!: How to apply the color. The standard mode is PorterDuff.Mode#SRC_ATOP

setColorFilter

Added in API level 8
fun setColorFilter(color: Int): Unit

Set a tinting option for the image. Assumes PorterDuff.Mode#SRC_ATOP blending mode.

Parameters
color Int: Color tint to apply.

setColorFilter

Added in API level 1
open fun setColorFilter(cf: ColorFilter!): Unit

Apply an arbitrary colorfilter to the image.

Parameters
cf ColorFilter!: the colorfilter to apply (may be null)

setCropToPadding

Added in API level 16
open fun setCropToPadding(cropToPadding: Boolean): Unit

Sets whether this ImageView will crop to padding.

Parameters
cropToPadding Boolean: whether this ImageView will crop to padding

setImageAlpha

Added in API level 16
open fun setImageAlpha(alpha: Int): Unit

Sets the alpha value that should be applied to the image.

Parameters
alpha Int: the alpha value that should be applied to the image (between 0 and 255 inclusive, with 0 being transparent and 255 being opaque)

See Also

setImageBitmap

Added in API level 1
open fun setImageBitmap(bm: Bitmap!): Unit

Sets a Bitmap as the content of this ImageView.

Parameters
bm Bitmap!: The bitmap to set

setImageDrawable

Added in API level 1
open fun setImageDrawable(drawable: Drawable?): Unit

Sets a drawable as the content of this ImageView.

Parameters
drawable Drawable?: the Drawable to set, or null to clear the content

setImageIcon

Added in API level 23
open fun setImageIcon(icon: Icon?): Unit

Sets the content of this ImageView to the specified Icon.

Depending on the Icon type, this may do Bitmap reading and decoding on the UI thread, which can cause UI jank. If that's a concern, consider using Icon#loadDrawableAsync(Context, Icon.OnDrawableLoadedListener, Handler) and then setImageDrawable(android.graphics.drawable.Drawable) instead.

Parameters
icon Icon?: an Icon holding the desired image, or null to clear the content

setImageLevel

Added in API level 1
open fun setImageLevel(level: Int): Unit

Sets the image level, when it is constructed from a android.graphics.drawable.LevelListDrawable.

Parameters
level Int: The new level for the image.

setImageMatrix

Added in API level 1
open fun setImageMatrix(matrix: Matrix!): Unit

Adds a transformation Matrix that is applied to the view's drawable when it is drawn. Allows custom scaling, translation, and perspective distortion.

Parameters
matrix Matrix!: The transformation parameters in matrix form.

setImageResource

Added in API level 1
open fun setImageResource(resId: Int): Unit

Sets a drawable as the content of this ImageView.

This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using setImageDrawable(android.graphics.drawable.Drawable) or setImageBitmap(android.graphics.Bitmap) and android.graphics.BitmapFactory instead.

Parameters
resId Int: the resource identifier of the drawable

setImageState

Added in API level 1
open fun setImageState(
    state: IntArray!,
    merge: Boolean
): Unit

Set the state of the current android.graphics.drawable.StateListDrawable. For more information about State List Drawables, see: the Drawable Resource Guide.

Parameters
state IntArray!: the state to set for the StateListDrawable
merge Boolean: if true, merges the state values for the state you specify into the current state

setImageTintBlendMode

Added in API level 29
open fun setImageTintBlendMode(blendMode: BlendMode?): Unit

Specifies the blending mode used to apply the tint specified by setImageTintList(android.content.res.ColorStateList)} to the image drawable. The default mode is BlendMode#SRC_IN.

Parameters
blendMode BlendMode?: the blending mode used to apply the tint, may be null to clear tint

setImageTintList

Added in API level 21
open fun setImageTintList(tint: ColorStateList?): Unit

Applies a tint to the image drawable. Does not modify the current tint mode, which is PorterDuff.Mode#SRC_IN by default.

Subsequent calls to setImageDrawable(android.graphics.drawable.Drawable) will automatically mutate the drawable and apply the specified tint and tint mode using Drawable#setTintList(ColorStateList).

Note: The default tint mode used by this setter is NOT consistent with the default tint mode used by the android:tint attribute. If the android:tint attribute is specified, the default tint mode will be set to PorterDuff.Mode#SRC_ATOP to ensure consistency with earlier versions of the platform.

Parameters
tint ColorStateList?: the tint to apply, may be null to clear tint

setImageTintMode

Added in API level 21
open fun setImageTintMode(tintMode: PorterDuff.Mode?): Unit

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

Parameters
tintMode PorterDuff.Mode?: the blending mode used to apply the tint, may be null to clear tint

setImageURI

Added in API level 1
open fun setImageURI(uri: Uri?): Unit

Sets the content of this ImageView to the specified Uri. Note that you use this method to load images from a local Uri only.

To learn how to display images from a remote Uri see: Handling Bitmaps

This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using setImageDrawable(android.graphics.drawable.Drawable) or setImageBitmap(android.graphics.Bitmap) and android.graphics.BitmapFactory instead.

On devices running SDK < 24, this method will fail to apply correct density scaling to images loaded from content and file schemes. Applications running on devices with SDK >= 24 MUST specify the targetSdkVersion in their manifest as 24 or above for density scaling to be applied to images loaded from these schemes.

Parameters
uri Uri?: the Uri of an image, or null to clear the content

setMaxHeight

Added in API level 1
open fun setMaxHeight(maxHeight: Int): Unit

An optional argument to supply a maximum height for this view. Only valid if setAdjustViewBounds(boolean) has been set to true. To set an image to be a maximum of 100 x 100 while preserving the original aspect ratio, do the following: 1) set adjustViewBounds to true 2) set maxWidth and maxHeight to 100 3) set the height and width layout params to WRAP_CONTENT.

Note that this view could be still smaller than 100 x 100 using this approach if the original image is small. To set an image to a fixed size, specify that size in the layout params and then use setScaleType(android.widget.ImageView.ScaleType) to determine how to fit the image within the bounds.

Parameters
maxHeight Int: maximum height for this view

See Also

setMaxWidth

Added in API level 1
open fun setMaxWidth(maxWidth: Int): Unit

An optional argument to supply a maximum width for this view. Only valid if setAdjustViewBounds(boolean) has been set to true. To set an image to be a maximum of 100 x 100 while preserving the original aspect ratio, do the following: 1) set adjustViewBounds to true 2) set maxWidth and maxHeight to 100 3) set the height and width layout params to WRAP_CONTENT.

Note that this view could be still smaller than 100 x 100 using this approach if the original image is small. To set an image to a fixed size, specify that size in the layout params and then use setScaleType(android.widget.ImageView.ScaleType) to determine how to fit the image within the bounds.

Parameters
maxWidth Int: maximum width for this view

See Also

setScaleType

Added in API level 1
open fun setScaleType(scaleType: ImageView.ScaleType!): Unit

Controls how the image should be resized or moved to match the size of this ImageView.

Parameters
scaleType ImageView.ScaleType!: The desired scaling mode.

setSelected

Added in API level 1
open fun setSelected(selected: Boolean): Unit
Parameters
selected Boolean: true if the view must be selected, false otherwise

setVisibility

Added in API level 1
open fun setVisibility(visibility: Int): Unit
Parameters
visibility Int: One of VISIBLE, INVISIBLE, or GONE. Value is android.view.View#VISIBLE, android.view.View#INVISIBLE, or android.view.View#GONE

Protected methods

drawableStateChanged

Added in API level 1
protected open fun drawableStateChanged(): Unit

onAttachedToWindow

Added in API level 1
protected open fun onAttachedToWindow(): Unit

onDetachedFromWindow

Added in API level 1
protected open fun onDetachedFromWindow(): Unit

onDraw

Added in API level 1
protected open fun onDraw(canvas: Canvas): Unit
Parameters
canvas Canvas: the canvas on which the background will be drawn This value cannot be null.

onMeasure

Added in API level 1
protected open fun onMeasure(
    widthMeasureSpec: Int,
    heightMeasureSpec: Int
): Unit
Parameters
widthMeasureSpec Int: horizontal space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.
heightMeasureSpec Int: vertical space requirements as imposed by the parent. The requirements are encoded with android.view.View.MeasureSpec.

setFrame

Added in API level 1
protected open fun setFrame(
    l: Int,
    t: Int,
    r: Int,
    b: Int
): Boolean

verifyDrawable

Added in API level 1
protected open fun verifyDrawable(dr: Drawable): Boolean

If your view subclass is displaying its own Drawable objects, it should override this function and return true for any Drawable it is displaying. This allows animations for those drawables to be scheduled.

Be sure to call through to the super class when overriding this function.
If you override this method you must call through to the superclass implementation.

Parameters
who The Drawable to verify. Return true if it is one you are displaying, else return the result of calling through to the super class. This value cannot be null.
dr Drawable: This value cannot be null.
Return
Boolean boolean If true then the Drawable is being displayed in the view; else false and it is not allowed to animate.