recolor

fun recolor(whichColor: Int, target: Color, animation: Animation? = null)

Animated.recolor this gradient color.

Parameters

whichColor

which color to recolor. 0 for the first color, 1 for the second color.


open override fun recolor(target: Color, animation: Animation?)

Deprecated (with error)

Gradient colors cannot be animated in this way. They can be animated separately using the given method.

Replace with

recolor(0, target, type, durationNanos)

Deprecated, see Component.recolor for how to animate gradients.