Incomprehensible situation. First, an error (in a real phone) crashed when trying to create a frame animation and 1280px images. Reduced them to 600 earned, but when exceeding 12-13 frames in the animation - the application is suspended and terminated. What can be wrong ? Even the loss of frames made in a separate stream - the application does not crash but there is no animation (white background). Animation is represented by XML:

img = (ImageView) findViewById(R.id.image); img.setBackgroundResource(R.drawable.bglayout); AnimationDrawable myAnim = (AnimationDrawable)img.getBackground(); myAnim.start(); 

 <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true"> <item android:duration="15" android:drawable="@drawable/vbg0000"/> <item android:duration="15" android:drawable="@drawable/vbg0001"/> <item android:duration="15" android:drawable="@drawable/vbg0002"/> <item android:duration="15" android:drawable="@drawable/vbg0003"/> <item android:duration="15" android:drawable="@drawable/vbg0004"/> <item android:duration="15" android:drawable="@drawable/vbg0005"/> <item android:duration="15" android:drawable="@drawable/vbg0006"/> <item android:duration="15" android:drawable="@drawable/vbg0007"/> <item android:duration="15" android:drawable="@drawable/vbg0008"/> <item android:duration="15" android:drawable="@drawable/vbg0009"/> <item android:duration="15" android:drawable="@drawable/vbg0010"/> <item android:duration="15" android:drawable="@drawable/vbg0011"/> <item android:duration="15" android:drawable="@drawable/vbg0012"/> <item android:duration="15" android:drawable="@drawable/vbg0013"/> <item android:duration="15" android:drawable="@drawable/vbg0014"/> <item android:duration="15" android:drawable="@drawable/vbg0015"/> <item android:duration="15" android:drawable="@drawable/vbg0016"/> <item android:duration="15" android:drawable="@drawable/vbg0017"/> <item android:duration="15" android:drawable="@drawable/vbg0018"/> <item android:duration="15" android:drawable="@drawable/vbg0019"/> </animation-list> 
  • And with what error flies? Out of memory? I was once in a similar situation helped to write my animator based on a timer. - pavel
  • I do not know, I still do not have the knowledge of debugging. But my phone is Galaxy s5, I had to theoretically sort of work - PeteGr
  • Generally. Read the log, make the images code different screens mdpi xdpi and so on. If the problem remains to think about custom libraries. - pavel
  • In short, you can't use DrawableAnimation like this. You just need to write a custom switcher of pictures with a timer so that it does not hang in the memory. Yes, and you can not render the animation in a separate stream, as you wrote above. But in general, your OutOfMemory is over, and it is worth mentioning this in the question. - Shwarz Andrei

0