2

need all your suggestions for this.

I am implementing some basic animations in my activity . Now i am in a situation where i want to pause the activity along with the animations when i started the activity the animation also starts from that pause position.How can i achieve this?

sample code::

TranslateAnimation mAnimation=new TranslateAnimation(20, 875, 0, 50);
mAnimation.setDuration(3000);
mAnimation.setAnimationListener(this);
mRlCurAnswer.startAnimation(mAnimation);

Thanks..

Taruni
  • 1,671
  • 4
  • 22
  • 43
  • Can you show how you are showing the Animation – Lalit Poptani Aug 29 '11 at 05:58
  • its hand animation towards right side of the screen when user pause the activity the hand will stop where it is right now.and starts from that position when resumes the activity. – Taruni Aug 29 '11 at 06:00
  • What is the minSdkversion for your app? You can call `cancel()` if your version is 2.2 and above. – Ron Aug 29 '11 at 06:01
  • is it frame animation or tween animation ? or you play any swf please show your code over here – Nikunj Patel Aug 29 '11 at 06:01
  • Well show code would be better. – Lalit Poptani Aug 29 '11 at 06:06
  • @user77777777 i am working on honeycomb...If cancel the animation we cant get it back where we stopped the animation...i want to resume the activity form the animation where it stopped previously – Taruni Aug 29 '11 at 06:11
  • it is not small code to put here....I am applying some basic animations not much...for example when hand starts from left to right on the middle of the animation if i pause the activity the hand will be stopped there itself and started from there if i resume the activity – Taruni Aug 29 '11 at 06:13
  • Hope these links will give a lead [1](http://stackoverflow.com/questions/2864488/how-do-i-pause-frame-animation-using-animationdrawable/7840895#7840895) and [2](http://stackoverflow.com/questions/20330628/android-pause-animation) – avinash Jul 28 '15 at 07:37

0 Answers0