I know this is probably a simple question but I'm not sure why this
doesn't work.
private Bitmap mSphere;
private puzzlePiece[][] pieces = new puzzlePiece[5][7];
mSphere = BitmapFactory.decodeResource(mContext.getResources(),
R.drawable.sphere);
for(int i = 0; i < 5; i++)
{
for(int j = 0; j < 7; j++)
{
pieces[i][j] = new puzzlePiece(mSphere);
}
}
---------------------------------------------
public class puzzlePiece {
public Bitmap mImage;
public boolean is_selected;
public puzzlePiece(Bitmap mImage_)
{
this.mImage = mImage_;
this.is_selected = false;
}
}
------------------------------------------------
This is where the code will break...
for(int i = 0; i < 5; i++)
{
for(int j = 0; j < 7; j++)
{
canvas.drawBitmap(pieces[i][j].mImage, i*64, j*64+32, new
Paint());
}
}
If I just draw mSphere itself, the code will work fine.. What exactly
am I doing wrong here?
- Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---