0

I have an app where I have to play png animations when a user answers a question. All png images are 320 x 569. My current implementation is done using animation-list using the technique mentioned here:

https://www.bignerdranch.com/blog/frame-animations-in-android/

and inside the Java class I used the code mentioned here:

Android AnimationDrawable and knowing when animation ends.

The animations were working fine but I was facing OutOfMemory Exception very frequently. So I added the following lines to the code from this post:

Animation Drawable causing OutOfMemoryError on second run in Android

and this solved my OOM problem. However, I am still facing the problem of recycled bitmaps when I run it for the 3rd or 4th time.

Is there any other way that we can implement png animations without the bitmap recycle issue?

Community
  • 1
  • 1
nexus
  • 119
  • 13

0 Answers0