how to apply many rotate translate,scale animation to imageview in android -


hi doing 1 application here when activity starts time need rotate image first need move image top center there have scale image after time have in visable imageview,i tried using below code first applied rotate animation applied translate animation.after 2 seconds applied scale animation image not scaling in center taking imagview original postion(top) there scaling need scale imageview after move animation there @ postion need scale image view...any 1 suggest how apply different animations single imageview.

public class extends activity{  translateanimation movelefttoright1; animation logomoveanimation; @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);      setcontentview(r.layout.game);  final imageview myimage = (imageview)findviewbyid(r.id.imageview1);       //rotate animation      final animation myrotation = animationutils.loadanimation(getapplicationcontext(), r.anim.rotator);         myimage.startanimation(myrotation);           //translate animation         movelefttoright1 = new translateanimation(0, 0, 0, 200);         movelefttoright1.setduration(2000);         movelefttoright1.setfillafter(true);         myimage.startanimation(movelefttoright1);          //scale animation       logomoveanimation = animationutils.loadanimation(this, r.anim.sacle);            handler handler = new handler();             handler.postdelayed(new runnable() {                 public void run() {                      myimage.startanimation(logomoveanimation);                 }             }, 2000);   } } 

use animation listener.

when animation end start animation.

for better reference

http://developer.android.com/reference/android/view/animation/animation.animationlistener.html

http://www.techrepublic.com/blog/android-app-builder/how-to-use-android-animation-listeners/


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -