0

I was looking for a solution to run a framanimation as my project splash screen . First I was facing OutOfmemory error . but this post https://stackoverflow.com/a/10993879/1909309 worked perfectly . but I want at the end of running all frames , animation to be stopped . but I couldn't find the way to stop the animation after 12 frames . plz help me out .

thnks in advance

Community
  • 1
  • 1
Wubbalubbadubdub
  • 2,415
  • 1
  • 24
  • 36

1 Answers1

2

need to stop the animation after running all frames . like I have 81 frames to animate and I want to run this animation for one time not repeatedly . I found the solution . just need to modify the getNext() methode here is the solution , after looping through the hole frames just call the onStop() method

private int getNext() {
        mIndex++;
        if (mIndex >= mFrames.length) {
            mIndex = 0;
            stop();
        }

        return mFrames[mIndex];
    }
Wubbalubbadubdub
  • 2,415
  • 1
  • 24
  • 36