-
- All Implemented Interfaces:
-
android.graphics.drawable.Animatable,android.graphics.drawable.Drawable.Callback
public final class ScaleDrawable extends Drawable implements Drawable.Callback, Animatable
A Drawable that centers and scales its child to fill its bounds.
This allows drawables that only draw within their intrinsic dimensions (e.g. AnimatedImageDrawable) to fill their entire bounds.
-
-
Constructor Summary
Constructors Constructor Description ScaleDrawable(Drawable child, Scale scale)ScaleDrawable(Drawable child)
-
Method Summary
Modifier and Type Method Description final DrawablegetChild()final ScalegetScale()Unitdraw(Canvas canvas)IntegergetAlpha()UnitsetAlpha(Integer alpha)IntegergetOpacity()ColorFiltergetColorFilter()UnitsetColorFilter(ColorFilter colorFilter)IntegergetIntrinsicWidth()IntegergetIntrinsicHeight()UnitunscheduleDrawable(Drawable who, Runnable what)UnitinvalidateDrawable(Drawable who)UnitscheduleDrawable(Drawable who, Runnable what, Long when)UnitsetTint(Integer tintColor)UnitsetTintList(ColorStateList tint)UnitsetTintMode(PorterDuff.Mode tintMode)UnitsetTintBlendMode(BlendMode blendMode)BooleanisRunning()Unitstart()Unitstop()-
Methods inherited from class coil.drawable.ScaleDrawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, getBounds, getCallback, getChangingConfigurations, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setVisible, unscheduleSelf -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getScale
final Scale getScale()
-
getOpacity
@Deprecated(message = Deprecated in Java) Integer getOpacity()
-
getColorFilter
ColorFilter getColorFilter()
-
setColorFilter
Unit setColorFilter(ColorFilter colorFilter)
-
getIntrinsicWidth
Integer getIntrinsicWidth()
-
getIntrinsicHeight
Integer getIntrinsicHeight()
-
unscheduleDrawable
Unit unscheduleDrawable(Drawable who, Runnable what)
-
invalidateDrawable
Unit invalidateDrawable(Drawable who)
-
scheduleDrawable
Unit scheduleDrawable(Drawable who, Runnable what, Long when)
-
setTintList
Unit setTintList(ColorStateList tint)
-
setTintMode
Unit setTintMode(PorterDuff.Mode tintMode)
-
setTintBlendMode
@RequiresApi(value = 29) Unit setTintBlendMode(BlendMode blendMode)
-
-
-
-