Questions tagged [animatedvectordrawable]
41 questions
11
votes
2 answers
How to add Animated Vector Drawable Animation?
I am trying to animate a vector path to a different path in my android app for testing but its not working properly . no animation is displayed on screen and neither any animation is shown.
My vector file is:

IO Devs
- 383
- 1
- 4
- 12
11
votes
1 answer
AnimatedVectorDrawable as Window background. Is it possible?
I'm trying to use AnimatedVectorDrawable as a splash animation placed in the window background. I use the official example given in https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html. It appears but doesn't…

WindRider
- 11,958
- 6
- 50
- 57
8
votes
0 answers
Add ObjectAnimator to AnimatedVectorDrawable at runtime
I'm able to change the fillColor of an AnimatedVectorDrawable by using xml files.
…

stack
- 613
- 10
- 20
5
votes
1 answer
AnimatedVectorDrawableCompat looping animation using callback
I'm trying to implement an animation in my Android app using AnimatedVectorDrawableCompat, for compatibility for API >= 21.
I want the animation to loop for the duration of the Activity. I'm able to play the animation, and it will also loop fine on…

tplive
- 687
- 8
- 17
4
votes
1 answer
Android Animated Vector Drawable cannot loop in xml
I want to set an Animated Vector Drawable to widget initial layout. The animation has many AnimationSet but it cannot set repeat together. It just can set repeat itself.
The following code animate the target vector "path1". I have 4 target but I…

JackWu
- 1,036
- 1
- 12
- 22
3
votes
1 answer
Start Animated Vector Drawable in Jetpack Compose
I have an animated vector drawable R.drawable.my_anim, which I would like to show and start in Jetpack Compose.
The drawable is shown/rendered correct, but the animation does not start
Here's the compose view:
@Composable
fun SplashView() {
…

Entreco
- 12,738
- 8
- 75
- 95
3
votes
0 answers
Why doesn't AnimatedVectorDrawable support seek?
At the Google IO presentation "Get Animated", Nick Butcher mentions that you can't seekTo on animated vector drawables.
https://youtu.be/N_x7SV3I3P0
For my purposes this is fine. I can chop up my animation in multiple smaller animations. But I still…

Maarten
- 6,894
- 7
- 55
- 90
3
votes
0 answers
How to Animate A Gradient using AnimatedVectorDrawables?
At 4:40 of Draw Me A Rainbow talk by Nick Butcher at Android Dev Summit 2018, he mentions animating a gradient. He talks about using repeat tileMode for a gradient and creating a rainbow like effect as below:
gradient_one.xml:

Mehdi Haghgoo
- 3,144
- 7
- 46
- 91
3
votes
0 answers
Return animation / new animation
I have animated-vector inside included in ImageView usind android:src. I am using this code in onClick to launch an animation:
Drawable drawable = element.getDrawable();
if (drawable instanceof Animatable) {
((Animatable)…

Tom11
- 2,419
- 8
- 30
- 56
3
votes
0 answers
Android: Start AnimatedVectorDrawable animation mid way
Background: I am looking to create a countdown timer similar to the native Clock app's Timer. I am very new to Android animations so I have been evaluating various solutions. I was looking to go with AnimatedVectorDrawables but hit a…

Smalls
- 352
- 3
- 13
3
votes
0 answers
Custom path cap on a Vector Drawable?
Is it possible to have a custom cap at the end of a path of on a vector drawable like an SVG Marker?
If not, is there a way to find the location of the end of the path from the Vector Drawable so I can draw it myself?
The vector drawable will be…

bkach
- 1,431
- 1
- 15
- 24
2
votes
0 answers
Customize speed animation for Animated Vector Drawable
I have animated vector, which just uses XML object animator. When i start my application, it will just start animating as usual. What i need to do, if my goal is to manipulate duration of animation for some targets or parts via code?

Дмитрий
- 31
- 1
- 2
2
votes
0 answers
How can I play two animatedVectorDrawables sequentially?
I saw this tutorials (1 and 2) about using AnimatedVectorDrawableCompat.
What's the way to play two animatedVectorDrawables sequentially?
For ObjectAnimator I would use AnimatorSet. For AnimatedVectorDrawableCompat I should use AnimationCallback ?
…

Elad Benda
- 35,076
- 87
- 265
- 471
2
votes
0 answers
How to animate icons in TabLayout using animated vector drawable?
I'm trying to animate the icons in a tablayout in my android app.
I've tried using animated vector drawables and AnimatedStateListDrawable, with a state on and state off and the animation I've designed it using shapeshifter, but nothing works.
I…

CLay
- 19
- 6
2
votes
0 answers
Animated Vector drawable: Animate from "round" strokeLineCap to "butt" strokeLineCap
Is there a way to animate a vector drawable from a "round" strokeLineCap to a "butt" strokeLineCap?
This is what I have tried: but all of these have crashed my app

vanlooverenkoen
- 2,121
- 26
- 50