CrossfadeDrawable

class CrossfadeDrawable(start: Drawable?, end: Drawable?, scale: Scale, durationMillis: Int, fadeStart: Boolean, preferExactIntrinsicSize: Boolean) : Drawable, Drawable.Callback, Animatable2Compat

A Drawable that crossfades from start to end.

NOTE: The animation can only be executed once as the start drawable is dereferenced at the end of the transition.

Parameters

start

The Drawable to crossfade from.

end

The Drawable to crossfade to.

scale

The scaling algorithm for start and end.

durationMillis

The duration of the crossfade animation.

fadeStart

If false, the start drawable will not fade out while the end drawable fades in.

preferExactIntrinsicSize

If true, this drawable's intrinsic width/height will only be -1 if startandend return -1 for that dimension. If false, the intrinsic width/height will be -1 if startorend return -1 for that dimension. This is useful for views that require an exact intrinsic size to scale the drawable.

Constructors

CrossfadeDrawable
Link copied to clipboard
fun CrossfadeDrawable(start: Drawable?, end: Drawable?, scale: Scale = Scale.FIT, durationMillis: Int = DEFAULT_DURATION, fadeStart: Boolean = true)
CrossfadeDrawable
Link copied to clipboard
fun CrossfadeDrawable(start: Drawable?, end: Drawable?, scale: Scale = Scale.FIT, durationMillis: Int = DEFAULT_DURATION, fadeStart: Boolean = true, preferExactIntrinsicSize: Boolean = false)

Types

Companion
Link copied to clipboard
object Companion

Functions

applyTheme
Link copied to clipboard
open fun applyTheme(p0: Resources.Theme)
canApplyTheme
Link copied to clipboard
open fun canApplyTheme(): Boolean
clearAnimationCallbacks
Link copied to clipboard
open override fun clearAnimationCallbacks()
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?
hasFocusStateSpecified
Link copied to clipboard
open fun hasFocusStateSpecified(): Boolean
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
registerAnimationCallback
Link copied to clipboard
open override fun registerAnimationCallback(callback: Animatable2Compat.AnimationCallback)
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()
unregisterAnimationCallback
Link copied to clipboard
open override fun unregisterAnimationCallback(callback: Animatable2Compat.AnimationCallback): Boolean
unscheduleDrawable
Link copied to clipboard
open override fun unscheduleDrawable(who: Drawable, what: Runnable)
unscheduleSelf
Link copied to clipboard
open fun unscheduleSelf(p0: Runnable)

Properties

durationMillis
Link copied to clipboard
val durationMillis: Int
fadeStart
Link copied to clipboard
val fadeStart: Boolean = true
preferExactIntrinsicSize
Link copied to clipboard
val preferExactIntrinsicSize: Boolean = false
scale
Link copied to clipboard
val scale: Scale