CrossfadeDrawable

class CrossfadeDrawable @JvmOverloads constructor(start: Drawable?, end: Drawable?, val scale: <Error class: unknown class> = Scale.FIT, val durationMillis: Int = DEFAULT_DURATION, val fadeStart: Boolean = true, val preferExactIntrinsicSize: Boolean = false) : 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 start and end return -1 for that dimension. If false, the intrinsic width/height will be -1 if start or end return -1 for that dimension. This is useful for views that require an exact intrinsic size to scale the drawable.

Constructors

Link copied to clipboard
constructor(start: Drawable?, end: Drawable?, scale: <Error class: unknown class> = Scale.FIT, durationMillis: Int = DEFAULT_DURATION, fadeStart: Boolean = true, preferExactIntrinsicSize: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val fadeStart: Boolean = true
Link copied to clipboard
Link copied to clipboard
val scale: <Error class: unknown class>
Link copied to clipboard

Functions

Link copied to clipboard
open override fun clearAnimationCallbacks()
Link copied to clipboard
open override fun draw(canvas: Canvas)
Link copied to clipboard
open override fun getAlpha(): Int
Link copied to clipboard
open override fun getColorFilter(): ColorFilter?
Link copied to clipboard
open override fun getIntrinsicHeight(): Int
Link copied to clipboard
open override fun getIntrinsicWidth(): Int
Link copied to clipboard
open override fun invalidateDrawable(who: Drawable)
Link copied to clipboard
open override fun isRunning(): Boolean
Link copied to clipboard
Link copied to clipboard
open override fun scheduleDrawable(who: Drawable, what: Runnable, when: Long)
Link copied to clipboard
open override fun setAlpha(alpha: Int)
Link copied to clipboard
open override fun setColorFilter(colorFilter: ColorFilter?)
Link copied to clipboard
open override fun setTint(tintColor: Int)
Link copied to clipboard
@RequiresApi(value = 29)
open override fun setTintBlendMode(blendMode: BlendMode?)
Link copied to clipboard
open override fun setTintList(tint: ColorStateList?)
Link copied to clipboard
open override fun setTintMode(tintMode: PorterDuff.Mode?)
Link copied to clipboard
open override fun start()
Link copied to clipboard
open override fun stop()
Link copied to clipboard
Link copied to clipboard
open override fun unscheduleDrawable(who: Drawable, what: Runnable)