Closed qadir227 closed 9 years ago
I don't know what is the ANIMATION_INTERVAL and how do you use it, but if you refer to the solution here: http://stackoverflow.com/questions/8692328/causing-outofmemoryerror-in-frame-by-frame-animation-in-android/10993879?noredirect=1#comment39768212_10993879
You need to set the FPS (Frames per second) to a higher value. My guess is that it won't help you since the frames are loaded on real-time... My suggestion would be to set the images to the same size and type and make sure that "if (Build.VERSION.SDK_INT >= 11) {"... code is running - It should use the same memory allocation for new images and give you better performance
Basically handler call a method to change image every milliseconds (in your case a 1 millisecond) I think it is not important how many images are loaded. I do not know how your source codes is working but I recommend to change AsyncTask with multiple thread on FasterAnimationsContatiner sourcecodes. please refer this link : http://stackoverflow.com/questions/18661288/android-two-asynctasks-serially-or-parallel-execution-the-second-is-freezing.
I have about 200 images. but animation is slow
I have set private static final int ANIMATION_INTERVAL = 1; but its animation looks very slow How to speed up the animation. frames/sec