Hi All,

I want to do a complex animation on the Android but I get the idea it is 
not possible.

For a simple example I want to merge three animations say for x, y, z AND 
have an array of these for a sequence of animations where one xyz runs 
after the previous one.

so:

Merge:
animation x, animation y, animation z

animation x1, animation y1, animation z1

animation x2, animation y2, animation z2

animation x3, animation y3, animation z3

...
animation x100, animation y100, animation z100

Looks like AnimatorSet supports a sequence of animation objects but not a 
merged animator array. Maybe using AnimatorSet.Builder will work?
The closest I can think of might be a loop of using with and after 
statements.

AnimatorSet s = new AnimatorSet();
Animation[] anim //initialized before the loop below.

for(int i=0; i<anim.size(); i=i+3)
{
     s.play(anim[i]).with(anim[i+1]) with(anim[i+2])); //x,y,z animations 
played together
     if(i>3) {
      s.play(anim[i] after anim[i-1]]); //run xyx just merged after the last 
merged set of xyz     
     }
   
}
s.start();

If there is a better way that works please let me know.

Thanks!




...

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/1dbec95c-5e1a-48f0-bc8b-08bc43162389%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to