DrawableWrapperCompat
public class DrawableWrapperCompat extends Drawable implements Drawable.Callback
| java.lang.Object | ||
| ↳ | android.graphics.drawable.Drawable | |
| ↳ | androidx.appcompat.graphics.drawable.DrawableWrapperCompat |
Drawable which delegates all calls to its wrapped Drawable.
The wrapped Drawablemust be fully released from any View before wrapping, otherwise internal Callback may be dropped.
Adapted from platform class, altered with API level checks as necessary.
Summary
Public constructors |
|---|
DrawableWrapperCompat(Drawable drawable)Creates a new wrapper around the specified drawable. |
Public methods |
|
|---|---|
void |
|
int |
|
Drawable |
|
@Nullable Drawable |
|
int |
|
int |
|
int |
|
int |
|
int |
This method is deprecated. |
boolean |
getPadding(Rect padding) |
int[] |
getState() |
Region |
|
void |
|
boolean |
|
boolean |
|
void |
|
void |
scheduleDrawable(Drawable who, Runnable what, long when) |
void |
setAlpha(int alpha) |
void |
setAutoMirrored(boolean mirrored) |
void |
setChangingConfigurations(int configs) |
void |
|
void |
setDither(boolean dither)This method is deprecated. |
void |
setDrawable(@Nullable Drawable drawable)Sets the wrapped drawable. |
void |
setFilterBitmap(boolean filter) |
void |
setHotspot(float x, float y) |
void |
setHotspotBounds(int left, int top, int right, int bottom) |
boolean |
setState(int[] stateSet) |
void |
setTint(int tint) |
void |
setTintList(ColorStateList tint) |
void |
setTintMode(PorterDuff.Mode tintMode) |
boolean |
setVisible(boolean visible, boolean restart) |
void |
unscheduleDrawable(Drawable who, Runnable what) |
Protected methods |
|
|---|---|
void |
onBoundsChange(Rect bounds) |
boolean |
onLevelChange(int level) |
Public constructors
DrawableWrapperCompat
Added in 1.6.0
public DrawableWrapperCompat(Drawable drawable)
Creates a new wrapper around the specified drawable.
Public methods
scheduleDrawable
Added in 1.6.0
public void scheduleDrawable(Drawable who, Runnable what, long when)
setDrawable
Added in 1.6.0
public void setDrawable(@Nullable Drawable drawable)
Sets the wrapped drawable.