I am currently developing a game and I\'m trying to use one AnimationDrawable to show one animation in my Main Menu. When I run the game once, it works perfectly. But if i t
You can try by reducing the size if images. My case it worked.
int[] frames = {R.drawable.frame1, R.drawable.frame2, R.drawable.frame3};
AnimationDrawable drawable = new AnimationDrawable();
for (int fr : frames) {
Bitmap sample = BitmapFactory.decodeResource(mActivity.getResources(), fr);
sample = Bitmap.createScaledBitmap(sample, sample.getWidth()/4, sample.getHeight()/4, false);
drawable.addFrame(new BitmapDrawable(mActivity.getResources(), sample), 30);
}