0

just simple question I have an animation where I should put them ? in On-create or in On-resume or where ? so that when I pause the activity the animation is paused .. not played in background ! and when I resume the Activity the animation resumes .. not start from zero ! ?

my animation is like that :

view.startAnimation(AnimationUtils.loadAnimation(this, R.anim.slide);
  • 1
    Do you know how to pause/resume the animation? – Peter Sep 24 '17 at 22:16
  • You should probably start the animation in Activity.onStart and pause it in Activity.onStop. An activity is considered visible/started once onStart has been called – Peter Sep 24 '17 at 22:18
  • I have read how to pause and resume animation using Animator .. so should I convert all my animation to Animator .. and it only supports minSdkVersion 19 ! – Hosain Mohamed Sep 24 '17 at 22:19

0 Answers0