Is there a way to animate Brush/gradient changes?
# compose
b
Is there a way to animate Brush/gradient changes?
n
You can create new brush/gradient instances with the individual colors you with to animate between
b
Wrapping the color I use to create the gradient with
animateColorAsState
kinda does the job for now, but I thought having something like
animateBrushAsState
would have different effect (in animation and maybe performance wise)
n
Under the hood the Brush allocates a Shader in the android framework which is immutable as well.
в
@Berkeli Alashov Have you found solution as an alternative to replace
animateBrushAsState
?
b
Decided to animate the color I use to create Brush instead, as suggested above.
109 Views