# RoundedBitmapDrawable

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core) [View Source](https://cs.android.com/search?q=file:androidx/core/graphics/drawable/RoundedBitmapDrawable.java+class:androidx.core.graphics.drawable.RoundedBitmapDrawable) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public abstract class RoundedBitmapDrawable extends Drawable
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) ||
|   | ↳ | [androidx.core.graphics.drawable.RoundedBitmapDrawable](https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable) |

*** ** * ** ***

A Drawable that wraps a bitmap and can be drawn with rounded corners. You can create a RoundedBitmapDrawable from a file path, an input stream, or from a `https://developer.android.com/reference/android/graphics/Bitmap.html` object.

Also see the `https://developer.android.com/reference/android/graphics/Bitmap.html` class, which handles the management and transformation of raw bitmap graphics, and should be used when drawing to a `https://developer.android.com/reference/android/graphics/Canvas.html`.

## Summary

| ### Public methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#draw(android.graphics.Canvas)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Canvas.html canvas)` |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getAlpha()()` |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/Bitmap.html` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getBitmap()()` Returns the bitmap used by this drawable to render. |
| `https://developer.android.com/reference/android/graphics/ColorFilter.html` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getColorFilter()()` |
| `float` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getCornerRadius()()` |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getGravity()()` Get the gravity used to position/stretch the bitmap within its bounds. |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getIntrinsicHeight()()` |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getIntrinsicWidth()()` |
| `int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getOpacity()()` **This method is deprecated.** |
| `final @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Paint.html` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#getPaint()()` Returns the paint used to render this drawable. |
| `boolean` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#hasAntiAlias()()` Indicates whether anti-aliasing is enabled for this drawable. |
| `boolean` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#hasMipMap()()` Indicates whether the mipmap hint is enabled on this drawable's bitmap. |
| `boolean` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#isCircular()()` |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setAlpha(int)(int alpha)` |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setAntiAlias(boolean)(boolean aa)` Enables or disables anti-aliasing for this drawable. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setCircular(boolean)(boolean circular)` Sets the image shape to circular. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setColorFilter(android.graphics.ColorFilter)(https://developer.android.com/reference/android/graphics/ColorFilter.html cf)` |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setCornerRadius(float)(float cornerRadius)` Sets the corner radius to be applied when drawing the bitmap. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setDither(boolean)(boolean dither)` **This method is deprecated.** |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setFilterBitmap(boolean)(boolean filter)` |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setGravity(int)(int gravity)` Set the gravity used to position/stretch the bitmap within its bounds. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setMipMap(boolean)(boolean mipMap)` Enables or disables the mipmap hint for this drawable's bitmap. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(android.graphics.Canvas)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Canvas.html canvas)` Set the density scale at which this drawable will be rendered. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(int)(int density)` Set the density at which this drawable will be rendered. |
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setTargetDensity(android.util.DisplayMetrics)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/DisplayMetrics.html metrics)` Set the density scale at which this drawable will be rendered. |

| ### Protected methods |
|---|---|
| `void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#onBoundsChange(android.graphics.Rect)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Rect.html bounds)` |

| ### Inherited methods |
|---|
| From [android.graphics.drawable.Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html) |---|---| | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#applyTheme(android.content.res.Resources.Theme)(https://developer.android.com/reference/android/content/res/Resources.Theme.html t)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#canApplyTheme()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#clearColorFilter()()` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds()()` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#copyBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromPath(java.lang.String)(https://developer.android.com/reference/java/lang/String.html pathName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromResourceStream(android.content.res.Resources, android.util.TypedValue, java.io.InputStream, java.lang.String)( https://developer.android.com/reference/android/content/res/Resources.html res, https://developer.android.com/reference/android/util/TypedValue.html value, https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName )` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromStream(java.io.InputStream, java.lang.String)(https://developer.android.com/reference/java/io/InputStream.html is, https://developer.android.com/reference/java/lang/String.html srcName)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXml(android.content.res.Resources, org.xmlpull.v1.XmlPullParser)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser)` | | `static https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#createFromXmlInner(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)( https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs )` | | `final https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getBounds()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCallback()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getChangingConfigurations()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.ConstantState.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getConstantState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getCurrent()()` | | `https://developer.android.com/reference/android/graphics/Rect.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getDirtyBounds()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getHotspotBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html outRect)` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()()` | | `final int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLevel()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumHeight()()` | | `int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getMinimumWidth()()` | | `https://developer.android.com/reference/android/graphics/Insets.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOpticalInsets()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getOutline(android.graphics.Outline)(https://developer.android.com/reference/android/graphics/Outline.html outline)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getPadding(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html padding)` | | `int[]` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getState()()` | | `https://developer.android.com/reference/android/graphics/Region.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getTransparentRegion()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#hasFocusStateSpecified()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet)(https://developer.android.com/reference/android/content/res/Resources.html r, https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, https://developer.android.com/reference/android/util/AttributeSet.html attrs)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#invalidateSelf()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isFilterBitmap()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isProjected()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isStateful()()` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isVisible()()` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()()` | | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#mutate()()` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLayoutDirectionChanged(int)(int layoutDirection)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onLevelChange(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#onStateChange(int[])(int[] state)` | | `static int` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#resolveOpacity(int, int)(int op1, int op2)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#scheduleSelf(java.lang.Runnable, long)(https://developer.android.com/reference/java/lang/Runnable.html what, long when)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setAutoMirrored(boolean)(boolean mirrored)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setBounds(android.graphics.Rect)(https://developer.android.com/reference/android/graphics/Rect.html bounds)` | | `final void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setCallback(android.graphics.drawable.Drawable.Callback)(https://developer.android.com/reference/android/graphics/drawable/Drawable.Callback.html cb)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setChangingConfigurations(int)(int configs)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspot(float, float)(float x, float y)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setHotspotBounds(int, int, int, int)(int left, int top, int right, int bottom)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)(int layoutDirection)` | | `final boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLevel(int)(int level)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setState(int[])(int[] stateSet)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTint(int)(int tintColor)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintBlendMode(android.graphics.BlendMode)(https://developer.android.com/reference/android/graphics/BlendMode.html blendMode)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintList(android.content.res.ColorStateList)(https://developer.android.com/reference/android/content/res/ColorStateList.html tint)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setTintMode(android.graphics.PorterDuff.Mode)(https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` | | `boolean` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setVisible(boolean, boolean)(boolean visible, boolean restart)` | | `void` | `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#unscheduleSelf(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable.html what)` | |

## Public methods

### draw

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

```
public void draw(@NonNull Canvas canvas)
```

### getAlpha

```
public int getAlpha()
```

### getBitmap

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

```
public final @Nullable Bitmap getBitmap()
```

Returns the bitmap used by this drawable to render. May be null.

### getColorFilter

```
public ColorFilter getColorFilter()
```

### getCornerRadius

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

```
public float getCornerRadius()
```

| Returns |
|---|---|
| `float` | The corner radius applied when drawing the bitmap. |

### getGravity

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

```
public int getGravity()
```

Get the gravity used to position/stretch the bitmap within its bounds.

| Returns |
|---|---|
| `int` | the gravity applied to the bitmap |

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/Gravity.html` |   |

### getIntrinsicHeight

```
public int getIntrinsicHeight()
```

### getIntrinsicWidth

```
public int getIntrinsicWidth()
```

### getOpacity

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

```
public int getOpacity()
```

> [!CAUTION]
> **This method is deprecated.**   

### getPaint

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

```
public final @NonNull Paint getPaint()
```

Returns the paint used to render this drawable.

### hasAntiAlias

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

```
public boolean hasAntiAlias()
```

Indicates whether anti-aliasing is enabled for this drawable.

| Returns |
|---|---|
| `boolean` | True if anti-aliasing is enabled, false otherwise. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setAntiAlias(boolean)` |   |

### hasMipMap

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

```
public boolean hasMipMap()
```

Indicates whether the mipmap hint is enabled on this drawable's bitmap.

| Returns |
|---|---|
| `boolean` | True if the mipmap hint is set, false otherwise. If the bitmap is null, this method always returns false. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setMipMap(boolean)` |   |

### isCircular

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

```
public boolean isCircular()
```

| Returns |
|---|---|
| `boolean` | `true` if the image is circular, else `false`. |

### setAlpha

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

```
public void setAlpha(int alpha)
```

### setAntiAlias

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

```
public void setAntiAlias(boolean aa)
```

Enables or disables anti-aliasing for this drawable. Anti-aliasing affects the edges of the bitmap only so it applies only when the drawable is rotated.

| Parameters |
|---|---|
| `boolean aa` | True if the bitmap should be anti-aliased, false otherwise. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#hasAntiAlias()` |   |

### setCircular

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

```
public void setCircular(boolean circular)
```

Sets the image shape to circular.

This overwrites any calls made to `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#setCornerRadius(float)` so far.

### setColorFilter

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

```
public void setColorFilter(ColorFilter cf)
```

### setCornerRadius

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

```
public void setCornerRadius(float cornerRadius)
```

Sets the corner radius to be applied when drawing the bitmap.

### setDither

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

```
public void setDither(boolean dither)
```

> [!CAUTION]
> **This method is deprecated.**   

### setFilterBitmap

```
public void setFilterBitmap(boolean filter)
```

### setGravity

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

```
public void setGravity(int gravity)
```

Set the gravity used to position/stretch the bitmap within its bounds.

| Parameters |
|---|---|
| `int gravity` | the gravity |

| See also |
|---|---|
| `https://developer.android.com/reference/android/view/Gravity.html` |   |

### setMipMap

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

```
public void setMipMap(boolean mipMap)
```

Enables or disables the mipmap hint for this drawable's bitmap. See `https://developer.android.com/reference/android/graphics/Bitmap.html#setHasMipMap(boolean)` for more information. If the bitmap is null, or the current API version does not support setting a mipmap hint, calling this method has no effect.

| Parameters |
|---|---|
| `boolean mipMap` | True if the bitmap should use mipmaps, false otherwise. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/graphics/drawable/RoundedBitmapDrawable#hasMipMap()` |   |

### setTargetDensity

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

```
public void setTargetDensity(@NonNull Canvas canvas)
```

Set the density scale at which this drawable will be rendered. This method assumes the drawable will be rendered at the same density as the specified canvas.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/Canvas.html canvas` | The Canvas from which the density scale must be obtained. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html#setDensity(int)` |   |
| `https://developer.android.com/reference/android/graphics/Bitmap.html#getDensity()` |   |

### setTargetDensity

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

```
public void setTargetDensity(int density)
```

Set the density at which this drawable will be rendered.

| Parameters |
|---|---|
| `int density` | The density scale for this drawable. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html#setDensity(int)` |   |
| `https://developer.android.com/reference/android/graphics/Bitmap.html#getDensity()` |   |

### setTargetDensity

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

```
public void setTargetDensity(@NonNull DisplayMetrics metrics)
```

Set the density scale at which this drawable will be rendered.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/DisplayMetrics.html metrics` | The DisplayMetrics indicating the density scale for this drawable. |

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/Bitmap.html#setDensity(int)` |   |
| `https://developer.android.com/reference/android/graphics/Bitmap.html#getDensity()` |   |

## Protected methods

### onBoundsChange

```
protected void onBoundsChange(@NonNull Rect bounds)
```