Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 834
arkit Avatar asked May 27 '16 12:05

arkit


1 Answers

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.

like image 192
Lewis McGeary Avatar answered Sep 30 '22 16:09

Lewis McGeary