ScaleDrawable

class ScaleDrawable @JvmOverloads() constructor(child: Drawable, scale: Scale) : Drawable, 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.

Constructors

ScaleDrawable
Link copied to clipboard
fun ScaleDrawable(child: Drawable, scale: Scale = Scale.FIT)

Functions

applyTheme
Link copied to clipboard
open fun applyTheme(p0: Resources.Theme)
canApplyTheme
Link copied to clipboard
open fun canApplyTheme(): Boolean
clearColorFilter
Link copied to clipboard
open fun clearColorFilter()
copyBounds
Link copied to clipboard
fun copyBounds(): Rect
fun copyBounds(p0: Rect)
draw
Link copied to clipboard
open override fun draw(canvas: Canvas)
getAlpha
Link copied to clipboard
@RequiresApi(value = 19)
open override fun getAlpha(): Int
getBounds
Link copied to clipboard
fun getBounds(): Rect
getCallback
Link copied to clipboard
open fun getCallback(): Drawable.Callback?
getChangingConfigurations
Link copied to clipboard
open fun getChangingConfigurations(): Int
getColorFilter
Link copied to clipboard
@RequiresApi(value = 21)
open override fun getColorFilter(): ColorFilter?
getConstantState
Link copied to clipboard
open fun getConstantState(): Drawable.ConstantState?
getCurrent
Link copied to clipboard
open fun getCurrent(): Drawable
getDirtyBounds
Link copied to clipboard
open fun getDirtyBounds(): Rect
getHotspotBounds
Link copied to clipboard
open fun getHotspotBounds(p0: Rect)
getIntrinsicHeight
Link copied to clipboard
open override fun getIntrinsicHeight(): Int
getIntrinsicWidth
Link copied to clipboard
open override fun getIntrinsicWidth(): Int
getLayoutDirection
Link copied to clipboard
open fun getLayoutDirection(): Int
getLevel
Link copied to clipboard
fun getLevel(): Int
getMinimumHeight
Link copied to clipboard
open fun getMinimumHeight(): Int
getMinimumWidth
Link copied to clipboard
open fun getMinimumWidth(): Int
getOpacity
Link copied to clipboard
open override fun getOpacity(): Int
getOpticalInsets
Link copied to clipboard
open fun getOpticalInsets(): Insets
getOutline
Link copied to clipboard
open fun getOutline(p0: Outline)
getPadding
Link copied to clipboard
open fun getPadding(p0: Rect): Boolean
getState
Link copied to clipboard
open fun getState(): IntArray
getTransparentRegion
Link copied to clipboard
open fun getTransparentRegion(): Region?
inflate
Link copied to clipboard
open fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet)
open fun inflate(p0: Resources, p1: XmlPullParser, p2: AttributeSet, p3: Resources.Theme?)
invalidateDrawable
Link copied to clipboard
open override fun invalidateDrawable(who: Drawable)
invalidateSelf
Link copied to clipboard
open fun invalidateSelf()
isAutoMirrored
Link copied to clipboard
open fun isAutoMirrored(): Boolean
isFilterBitmap
Link copied to clipboard
open fun isFilterBitmap(): Boolean
isProjected
Link copied to clipboard
open fun isProjected(): Boolean
isRunning
Link copied to clipboard
open override fun isRunning(): Boolean
isStateful
Link copied to clipboard
open fun isStateful(): Boolean
isVisible
Link copied to clipboard
fun isVisible(): Boolean
jumpToCurrentState
Link copied to clipboard
open fun jumpToCurrentState()
mutate
Link copied to clipboard
open fun mutate(): Drawable
onLayoutDirectionChanged
Link copied to clipboard
open fun onLayoutDirectionChanged(p0: Int): Boolean
scheduleDrawable
Link copied to clipboard
open override fun scheduleDrawable(who: Drawable, what: Runnable, when: Long)
scheduleSelf
Link copied to clipboard
open fun scheduleSelf(p0: Runnable, p1: Long)
setAlpha
Link copied to clipboard
open override fun setAlpha(alpha: Int)
setAutoMirrored
Link copied to clipboard
open fun setAutoMirrored(p0: Boolean)
setBounds
Link copied to clipboard
open fun setBounds(p0: Rect)
open fun setBounds(p0: Int, p1: Int, p2: Int, p3: Int)
setCallback
Link copied to clipboard
fun setCallback(p0: Drawable.Callback?)
setChangingConfigurations
Link copied to clipboard
open fun setChangingConfigurations(p0: Int)
setColorFilter
Link copied to clipboard
@RequiresApi(value = 21)
open override fun setColorFilter(colorFilter: ColorFilter?)
open fun setColorFilter(p0: Int, p1: PorterDuff.Mode)
setDither
Link copied to clipboard
open fun setDither(p0: Boolean)
setFilterBitmap
Link copied to clipboard
open fun setFilterBitmap(p0: Boolean)
setHotspot
Link copied to clipboard
open fun setHotspot(p0: Float, p1: Float)
setHotspotBounds
Link copied to clipboard
open fun setHotspotBounds(p0: Int, p1: Int, p2: Int, p3: Int)
setLayoutDirection
Link copied to clipboard
fun setLayoutDirection(p0: Int): Boolean
setLevel
Link copied to clipboard
fun setLevel(p0: Int): Boolean
setState
Link copied to clipboard
open fun setState(p0: IntArray): Boolean
setTint
Link copied to clipboard
@RequiresApi(value = 21)
open override fun setTint(tintColor: Int)
setTintBlendMode
Link copied to clipboard
@RequiresApi(value = 29)
open override fun setTintBlendMode(blendMode: BlendMode?)
setTintList
Link copied to clipboard
@RequiresApi(value = 21)
open override fun setTintList(tint: ColorStateList?)
setTintMode
Link copied to clipboard
@RequiresApi(value = 21)
open override fun setTintMode(tintMode: PorterDuff.Mode?)
setVisible
Link copied to clipboard
open fun setVisible(p0: Boolean, p1: Boolean): Boolean
start
Link copied to clipboard
open override fun start()
stop
Link copied to clipboard
open override fun stop()
unscheduleDrawable
Link copied to clipboard
open override fun unscheduleDrawable(who: Drawable, what: Runnable)
unscheduleSelf
Link copied to clipboard
open fun unscheduleSelf(p0: Runnable)

Properties

child
Link copied to clipboard
val child: Drawable