I know we can draw a vector drawable like this on canvas:
vectorDrawable.setBounds(left, top, right, bottom);
vectorDrawable.draw(canvas);
but Is it possible to use animatedVectorDrawables in custom view?
I know we can draw a vector drawable like this on canvas:
vectorDrawable.setBounds(left, top, right, bottom);
vectorDrawable.draw(canvas);
but Is it possible to use animatedVectorDrawables in custom view?
Yes, it is possible, and looks like the snippet you have would work. Be sure to set bounds and call the
start()
method on the drawable to start the animation.