# DrawableCompat

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/DrawableCompat.java+class:androidx.core.graphics.drawable.DrawableCompat) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***


```
public final class DrawableCompat
```

<br />

*** ** * ** ***

Helper for accessing features in `https://developer.android.com/reference/android/graphics/drawable/Drawable.html`.

## Summary

| ### Public methods |
|---|---|
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#applyTheme(android.graphics.drawable.Drawable,android.content.res.Resources.Theme)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme)` Applies the specified theme to this Drawable and its children. |
| `static boolean` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#canApplyTheme(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Whether a theme can be applied to this Drawable and its children. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#clearColorFilter(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Removes the color filter from the given drawable. |
| `static int` | `@https://developer.android.com/reference/androidx/annotation/ReplaceWith(expression = "drawable.getAlpha()") [getAlpha](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#getAlpha(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` **This method is deprecated.** Call `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha()` directly. <br /> |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/ColorFilter.html` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#getColorFilter(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Returns the current color filter, or `null` if none set. |
| `static int` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#getLayoutDirection(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Returns the resolved layout direction for this Drawable. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#inflate(android.graphics.drawable.Drawable,android.content.res.Resources,org.xmlpull.v1.XmlPullParser,android.util.AttributeSet,android.content.res.Resources.Theme)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html res, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser, @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/AttributeSet.html attrs, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme )` Inflate this Drawable from an XML resource optionally styled by a theme. |
| `static boolean` | `@https://developer.android.com/reference/androidx/annotation/ReplaceWith(expression = "drawable.isAutoMirrored()") [isAutoMirrored](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#isAutoMirrored(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` **This method is deprecated.** Call `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()` directly. <br /> |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/ReplaceWith(expression = "drawable.jumpToCurrentState()") [jumpToCurrentState](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#jumpToCurrentState(android.graphics.drawable.Drawable))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` **This method is deprecated.** Use `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()` directly. <br /> |
| `static void` | `@https://developer.android.com/reference/androidx/annotation/ReplaceWith(expression = "drawable.setAutoMirrored(mirrored)") [setAutoMirrored](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setAutoMirrored(android.graphics.drawable.Drawable,boolean))(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, boolean mirrored)` **This method is deprecated.** Call setAutoMirrored directly. <br /> |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setHotspot(android.graphics.drawable.Drawable,float,float)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, float x, float y)` Specifies the hotspot's location within the drawable. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setHotspotBounds(android.graphics.drawable.Drawable,int,int,int,int)( @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, int left, int top, int right, int bottom )` Sets the bounds to which the hotspot is constrained, if they should be different from the drawable bounds. |
| `static boolean` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setLayoutDirection(android.graphics.drawable.Drawable,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, int layoutDirection)` Set the layout direction for this drawable. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTint(android.graphics.drawable.Drawable,int)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, @https://developer.android.com/reference/androidx/annotation/ColorInt int tint)` Specifies a tint for `drawable`. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTintList(android.graphics.drawable.Drawable,android.content.res.ColorStateList)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/ColorStateList.html tint)` Specifies a tint for `drawable` as a color state list. |
| `static void` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTintMode(android.graphics.drawable.Drawable,android.graphics.PorterDuff.Mode)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable, @https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode)` Specifies a tint blending mode for `drawable`. |
| `static T` | `<T extends https://developer.android.com/reference/android/graphics/drawable/Drawable.html> https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#unwrap(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Unwrap `drawable` if it is the result of a call to `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#wrap(android.graphics.drawable.Drawable)`. |
| `static @https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#wrap(android.graphics.drawable.Drawable)(@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable)` Potentially wrap `drawable` so that it may be used for tinting across the different API levels, via the tinting methods in this class. |

## Public methods

### applyTheme

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

```
public static void applyTheme(@NonNull Drawable drawable, @NonNull Resources.Theme theme)
```

Applies the specified theme to this Drawable and its children.

### canApplyTheme

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

```
public static boolean canApplyTheme(@NonNull Drawable drawable)
```

Whether a theme can be applied to this Drawable and its children.

### clearColorFilter

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

```
public static void clearColorFilter(@NonNull Drawable drawable)
```

Removes the color filter from the given drawable.

### getAlpha

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

```
@ReplaceWith(expression = "drawable.getAlpha()")
public static int [getAlpha](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#getAlpha(android.graphics.drawable.Drawable))(@NonNull Drawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Call `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getAlpha()` directly.

Get the alpha value of the `drawable`. 0 means fully transparent, 255 means fully opaque.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |

### getColorFilter

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

```
public static @Nullable ColorFilter getColorFilter(@NonNull Drawable drawable)
```

Returns the current color filter, or `null` if none set.

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/ColorFilter.html` | the current color filter, or `null` if none set |

### getLayoutDirection

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

```
public static int getLayoutDirection(@NonNull Drawable drawable)
```

Returns the resolved layout direction for this Drawable.

| Returns |
|---|---|
| `int` | One of `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_LTR()`, `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_RTL()` |

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#setLayoutDirection(int)` |   |

### inflate

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

```
public static void inflate(
    @NonNull Drawable drawable,
    @NonNull Resources res,
    @NonNull XmlPullParser parser,
    @NonNull AttributeSet attrs,
    @Nullable Resources.Theme theme
)
```

Inflate this Drawable from an XML resource optionally styled by a theme.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | drawable to inflate. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/content/res/Resources.html res` | Resources used to resolve attribute values |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html parser` | XML parser from which to inflate this Drawable |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/util/AttributeSet.html attrs` | Base set of attribute values |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/Resources.Theme.html theme` | Theme to apply, may be null |

| Throws |
|---|---|
| `https://developer.android.com/reference/org/xmlpull/v1/XmlPullParserException.html` |   |
| `https://developer.android.com/reference/java/io/IOException.html` |   |

### isAutoMirrored

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

```
@ReplaceWith(expression = "drawable.isAutoMirrored()")
public static boolean [isAutoMirrored](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#isAutoMirrored(android.graphics.drawable.Drawable))(@NonNull Drawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Call `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#isAutoMirrored()` directly.

Tells if this Drawable will be automatically mirrored when its layout direction is RTL right-to-left. See `https://developer.android.com/reference/android/util/LayoutDirection.html`.

If running on a pre-`https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#KITKAT` device this method returns false.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |

| Returns |
|---|---|
| `boolean` | boolean Returns true if this Drawable will be automatically mirrored. |

### jumpToCurrentState

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

```
@ReplaceWith(expression = "drawable.jumpToCurrentState()")
public static void [jumpToCurrentState](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#jumpToCurrentState(android.graphics.drawable.Drawable))(@NonNull Drawable drawable)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()` directly.

Call `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#jumpToCurrentState()`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |

### setAutoMirrored

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

```
@ReplaceWith(expression = "drawable.setAutoMirrored(mirrored)")
public static void [setAutoMirrored](https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setAutoMirrored(android.graphics.drawable.Drawable,boolean))(@NonNull Drawable drawable, boolean mirrored)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Call setAutoMirrored directly.

Set whether this Drawable is automatically mirrored when its layout direction is RTL (right-to left). See `https://developer.android.com/reference/android/util/LayoutDirection.html`.

If running on a pre-`https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#KITKAT` device this method does nothing.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `boolean mirrored` | Set to true if the Drawable should be mirrored, false if not. |

### setHotspot

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

```
public static void setHotspot(@NonNull Drawable drawable, float x, float y)
```

Specifies the hotspot's location within the drawable.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `float x` | The X coordinate of the center of the hotspot |
| `float y` | The Y coordinate of the center of the hotspot |

### setHotspotBounds

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

```
public static void setHotspotBounds(
    @NonNull Drawable drawable,
    int left,
    int top,
    int right,
    int bottom
)
```

Sets the bounds to which the hotspot is constrained, if they should be different from the drawable bounds.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `int left` | position in pixels of the left bound |
| `int top` | position in pixels of the top bound |
| `int right` | position in pixels of the right bound |
| `int bottom` | position in pixels of the bottom bound |

### setLayoutDirection

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

```
public static boolean setLayoutDirection(@NonNull Drawable drawable, int layoutDirection)
```

Set the layout direction for this drawable. Should be a resolved layout direction, as the Drawable has no capacity to do the resolution on its own.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | drawable for which to set the layout direction. |
| `int layoutDirection` | the resolved layout direction for the drawable, either `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_LTR()` or `https://developer.android.com/reference/androidx/core/view/ViewCompat#LAYOUT_DIRECTION_RTL()` |

| Returns |
|---|---|
| `boolean` | `true` if the layout direction change has caused the appearance of the drawable to change such that it needs to be re-drawn, `false` otherwise |

| See also |
|---|---|
| `https://developer.android.com/reference/android/graphics/drawable/Drawable.html#getLayoutDirection()` |   |

### setTint

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

```
public static void setTint(@NonNull Drawable drawable, @ColorInt int tint)
```

Specifies a tint for `drawable`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `@https://developer.android.com/reference/androidx/annotation/ColorInt int tint` | Color to use for tinting this drawable |

### setTintList

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

```
public static void setTintList(@NonNull Drawable drawable, @Nullable ColorStateList tint)
```

Specifies a tint for `drawable` as a color state list.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/content/res/ColorStateList.html tint` | Color state list to use for tinting this drawable, or null to clear the tint |

### setTintMode

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

```
public static void setTintMode(@NonNull Drawable drawable, @Nullable PorterDuff.Mode tintMode)
```

Specifies a tint blending mode for `drawable`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable against which to invoke the method. |
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/Nullable.html https://developer.android.com/reference/android/graphics/PorterDuff.Mode.html tintMode` | A Porter-Duff blending mode |

### unwrap

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

```
public static T <T extends Drawable> unwrap(@NonNull Drawable drawable)
```

Unwrap `drawable` if it is the result of a call to `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#wrap(android.graphics.drawable.Drawable)`. If the `drawable` is not the result of a call to `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#wrap(android.graphics.drawable.Drawable)` then `drawable` is returned as-is.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The drawable to unwrap |

| Returns |
|---|---|
| `T` | the unwrapped `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` or `drawable` if it hasn't been wrapped. |

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

### wrap

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

```
public static @NonNull Drawable wrap(@NonNull Drawable drawable)
```

Potentially wrap `drawable` so that it may be used for tinting across the different API levels, via the tinting methods in this class.

If the given drawable is wrapped, we will copy over certain state over to the wrapped drawable, such as its bounds, level, visibility and state.

You must use the result of this call. If the given drawable is being used by a view (as its background for instance), you must replace the original drawable with the result of this call:

```
Drawable bg = DrawableCompat.wrap(view.getBackground());
// Need to set the background with the wrapped drawable
view.setBackground(bg);

// You can now tint the drawable
DrawableCompat.setTint(bg, ...);
```

If you need to get hold of the original `https://developer.android.com/reference/android/graphics/drawable/Drawable.html` again, you can use the value returned from `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#unwrap(android.graphics.drawable.Drawable)`.

| Parameters |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html drawable` | The Drawable to process |

| Returns |
|---|---|
| `@https://jspecify.dev/docs/api/org/jspecify/annotations/NonNull.html https://developer.android.com/reference/android/graphics/drawable/Drawable.html` | A drawable capable of being tinted across all API levels. |

| See also |
|---|---|
| `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTint(android.graphics.drawable.Drawable,int)` |   |
| `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTintList(android.graphics.drawable.Drawable,android.content.res.ColorStateList)` |   |
| `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#setTintMode(android.graphics.drawable.Drawable,android.graphics.PorterDuff.Mode)` |   |
| `https://developer.android.com/reference/androidx/core/graphics/drawable/DrawableCompat#unwrap(android.graphics.drawable.Drawable)` |   |