DrawableWrapperCompat


class DrawableWrapperCompat : Drawable, Drawable.Callback


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

Creates a new wrapper around the specified drawable.

Protected functions

Unit
onBoundsChange(bounds: Rect!)
Boolean

Inherited functions

From android.graphics.drawable.Drawable
Unit
Boolean
Unit
Rect!
Unit
copyBounds(bounds: Rect!)
java-static Drawable!
createFromPath(pathName: String!)
java-static Drawable!
createFromResourceStream(
    res: Resources!,
    value: TypedValue!,
    is: InputStream!,
    srcName: String!
)
java-static Drawable!
createFromStream(is: InputStream!, srcName: String!)
java-static Drawable!
java-static Drawable!
createFromXmlInner(
    r: Resources!,
    parser: XmlPullParser!,
    attrs: AttributeSet!
)
Int
Rect!
Drawable.Callback!
ColorFilter!
Drawable.ConstantState!
Rect!
Unit
Int
Int
Insets!
Unit
getOutline(outline: Outline!)
Boolean
Unit
inflate(r: Resources!, parser: XmlPullParser!, attrs: AttributeSet!)
Unit
Boolean
Boolean
Boolean
Drawable!
Boolean
onLayoutDirectionChanged(layoutDirection: Int)
Boolean
java-static Int
resolveOpacity(op1: Int, op2: Int)
Unit
scheduleSelf(what: Runnable!, when: Long)
Unit
setBounds(left: Int, top: Int, right: Int, bottom: Int)
Unit
Boolean
setLayoutDirection(layoutDirection: Int)
Boolean
setLevel(level: Int)
Unit
Unit

Public constructors

DrawableWrapperCompat

Added in 1.6.0
DrawableWrapperCompat(drawable: Drawable!)

Creates a new wrapper around the specified drawable.

Public functions

draw

Added in 1.6.0
fun draw(canvas: Canvas): Unit

getChangingConfigurations

fun getChangingConfigurations(): Int

getCurrent

fun getCurrent(): Drawable!

getDrawable

Added in 1.6.0
fun getDrawable(): Drawable?
Returns
Drawable?

the wrapped drawable

getIntrinsicHeight

fun getIntrinsicHeight(): Int

getIntrinsicWidth

fun getIntrinsicWidth(): Int

getMinimumHeight

fun getMinimumHeight(): Int

getMinimumWidth

fun getMinimumWidth(): Int

getOpacity

Added in 1.6.0
fun getOpacity(): Int

getPadding

fun getPadding(padding: Rect!): Boolean

getState

fun getState(): IntArray<Int>!

getTransparentRegion

fun getTransparentRegion(): Region!

invalidateDrawable

Added in 1.6.0
fun invalidateDrawable(who: Drawable!): Unit

isAutoMirrored

fun isAutoMirrored(): Boolean

isStateful

fun isStateful(): Boolean

jumpToCurrentState

fun jumpToCurrentState(): Unit

scheduleDrawable

Added in 1.6.0
fun scheduleDrawable(who: Drawable!, what: Runnable!, when: Long): Unit

setAlpha

Added in 1.6.0
fun setAlpha(alpha: Int): Unit

setAutoMirrored

fun setAutoMirrored(mirrored: Boolean): Unit

setChangingConfigurations

fun setChangingConfigurations(configs: Int): Unit

setColorFilter

Added in 1.6.0
fun setColorFilter(cf: ColorFilter!): Unit

setDither

Added in 1.6.0
fun setDither(dither: Boolean): Unit

setDrawable

Added in 1.6.0
fun setDrawable(drawable: Drawable?): Unit

Sets the wrapped drawable.

Parameters
drawable: Drawable?

the wrapped drawable

setFilterBitmap

fun setFilterBitmap(filter: Boolean): Unit

setHotspot

fun setHotspot(x: Float, y: Float): Unit

setHotspotBounds

fun setHotspotBounds(left: Int, top: Int, right: Int, bottom: Int): Unit

setState

fun setState(stateSet: IntArray!): Boolean

setTint

fun setTint(tint: Int): Unit

setTintList

fun setTintList(tint: ColorStateList!): Unit

setTintMode

fun setTintMode(tintMode: PorterDuff.Mode!): Unit

setVisible

fun setVisible(visible: Boolean, restart: Boolean): Boolean

unscheduleDrawable

Added in 1.6.0
fun unscheduleDrawable(who: Drawable!, what: Runnable!): Unit

Protected functions

onBoundsChange

protected fun onBoundsChange(bounds: Rect!): Unit

onLevelChange

protected fun onLevelChange(level: Int): Boolean