Skip to content Skip to sidebar Skip to footer

Android:translation And Rotation Animation Simultaneously

I want to show two animation simultaneously programatically not in XML file.It should ROTATE and TRANSLATE how can I do that? Please suggest me some way?????? Here is ma code:>

Solution 1:

I have done it Using ANIMATIONSET we can do this.

AnimationSetsnowMov1=newAnimationSet(true);
        RotateAnimationrotate1=newRotateAnimation(0,360, Animation.RELATIVE_TO_SELF,0.5f , Animation.RELATIVE_TO_SELF,0.5f );
        rotate1.setStartOffset(50);
        rotate1.setDuration(9500);
        snowMov1.addAnimation(rotate1);
        TranslateAnimationtrans1=newTranslateAnimation(Animation.RELATIVE_TO_PARENT, 0.1f, Animation.RELATIVE_TO_PARENT, 0.3f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.9f);
        trans1.setDuration(12000);
        snowMov1.addAnimation(trans1);

In this way we can made set for multiple animations.

Post a Comment for "Android:translation And Rotation Animation Simultaneously"