arkit
arkit

Reputation: 392

Alpha animator to a group element in AnimatedVectorDrawable

Is it possible to apply an alpha animator to a <group> element instead of whole <vector> element in an AnimatedVectorDrawable? If not, is there any alternative to this ?

Upvotes: 6

Views: 1507

Answers (1)

Lewis McGeary
Lewis McGeary

Reputation: 7932

No, the <group> element doesn't have an alpha property.

As per the VectorDrawable documentation, the parts of the VectorDrawable with alpha are the whole <vector> which has android:alpha and the <path> which has android:strokeAlpha and android:fillAlpha.

So if you want to animate the alpha of only part of the VectorDrawable you should animate the fillAlpha and/or strokeAlpha of the relevant paths.

Upvotes: 10

Related Questions