mBackgroundGraphic = BitmapFactory.decodeResource(getResources(), R.drawable.background);
mBackgroundGraphic = getResizedBitmap(mBackgroundGraphic);
public Bitmap getResizedBitmap(Bitmap bm) {
int width = bm.getWidth();
int height = bm.getHeight();
int displayWidth = mDisplay.getWidth();
int displayHeight = mDisplay.getHeight();
float scaleWidth = ((float) displayWidth) / width;
float scaleHeight = ((float) displayHeight) / height;
// Create a matrix for the manipulation
Matrix matrix = new Matrix();
// Resize the bit map
matrix.postScale(scaleWidth, scaleHeight);
// Return the new stretched Bitmap
return Bitmap.createBitmap(bm, 0, 0, width, height, matrix, false);
}