android - how can i hold the activity till the animation gets executed -
animfadein = animationutils.loadanimation(getapplicationcontext(), r.drawable.fade_in); // set animation listener //animblink.setanimationlistener(this); opt1.setonclicklistener(new onclicklistener() { @override public void onclick(view arg0) { l1.startanimation(animfadein); startactivity(new intent(mainactivity.this,secondquestion.class)); } }); <?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" android:fillafter="true" > <alpha android:duration="10000" android:fromalpha="0.0" android:interpolator="@android:anim/accelerate_interpolator" android:toalpha="1.0" />
i want animation execute next activity should called how can achieve this. before 10000 sec been on next activity been called.
use animationlistener:
animfadein.setanimationlistener(new animation.animationlistener() { @override public void onanimationstart(animation animation) { } @override public void onanimationend(animation animation) { startactivity(new intent(mainactivity.this,secondquestion.class)); } @override public void onanimationrepeat(animation animation) { } });
Comments
Post a Comment