Merge two animations in Android
I'm trying to combine two animations programmatically. In that simplified example:
Animation translate = new TranslateAnimation(0, -100, 0, 0);
translate.setDuration(1000);
Animation zoom = new ScaleAnimation(0, 1, 0, 1);
zoom.setDuration(1000);
I want the view make both animations at the same time. How can I do it?
The background of that question is because I have a more complex animation in a xml file and I want to combine that animation with a translation without modifying the开发者_JS百科 original xml.
Thanks
Merge two Animation using AnimationSet
You can go for AnimationSet and add both animations into that AnimationSet and start that AnimationSet
精彩评论