Friday, 15 March 2013

android - Multiple Animations in Parallel -



android - Multiple Animations in Parallel -

i using animationdrawable alter around 15 images on oncreate using onwindowfocus()method. using translation animation in anim translating image 1 point another.

i trying execute both in parallel(change drawables according translation ) changes drawable after translation animation please help..

final animation = animationutils.loadanimation(this, r.anim.animation); a.reset();

iv=(imageview)findviewbyid(r.id.imageview1); iv.startanimation(a); iv.setbackgroundresource(r.drawable.animation_list); iv.setvisibility(view.invisible); iv.setanimation(a); a.setanimationlistener(new animationlistener() { @override public void onanimationstart(animation animation) { // todo auto-generated method stub iv.setbackgroundresource(r.drawable.animation_list); } @override public void onanimationrepeat(animation animation) { // todo auto-generated method stub } @override public void onanimationend(animation animation) { // todo auto-generated method stub } }); a.startnow(); } public void onwindowfocuschanged(boolean hasfocus) { loadinganimation = (animationdrawable) findviewbyid(r.id.imageview1).getbackground(); if (hasfocus) { loadinganimation.start(); } else { loadinganimation.stop(); } }

android android-layout android-widget

No comments:

Post a Comment