//Declares all of the Bitmaps that will be used
private void DeclareBitmaps()
{
CircleBP[0] = BitmapFactory.decodeResource(getResources(), R.drawable.circle);
CircleBP[1] = BitmapFactory.decodeResource(getResources(), R.drawable.circle2);
CircleBP[2] = BitmapFactory.decodeResource(getResources(), R.drawable.circle3);
CircleBP[3] = BitmapFactory.decodeResource(getResources(), R.drawable.circle4);
CircleBP[4] = BitmapFactory.decodeResource(getResources(), R.drawable.circle5);
CircleBP[5] = BitmapFactory.decodeResource(getResources(), R.drawable.circle6);
CircleBP[6] = BitmapFactory.decodeResource(getResources(), R.drawable.circle7);
GameTypeButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.gametype_button);
IntenseButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.intense_button);
MainMenuButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.mainmenu_button);
NormalButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.normal_button);
PauseButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.pause_button);
PlayAgainButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.playagain_button);
ResumeButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.resume_button);
ReturnMenuButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.returnmenu_button);
SeperationLineBP = BitmapFactory.decodeResource(getResources(), R.drawable.seperation_line);
StartGameButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.startgame_button);
TypeReturnMenuButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.typereturnmenu_button);
GreenNormalButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.green_normal_button);
GreenIntenseButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.green_intense_button);
GeneralButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.general_button);
OptionsButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.options_button);
CheckBoxBP = BitmapFactory.decodeResource(getResources(), R.drawable.check_box);
CheckBP = BitmapFactory.decodeResource(getResources(), R.drawable.check);
}
So basically what I do in this method is just assign all my sprites. The part where I have an issue is in the line
OptionsButtonBP = BitmapFactory.decodeResource(getResources(), R.drawable.options_button);
I've tried increasing the VM heapsize for the emulator I'm using but it still doesn't work. I've tried a little debugging by taking out the line where I declare this, and the issue goes away, of course then I have issues with wherever else I use this, but does anyone know why this happens? I don't think it's actually because the size is going over because I have two other sprites afterwards. Is there any other reason this might happen?

New Topic/Question
Reply



MultiQuote




|