I am currently using the following snippet of code to set my wallpaper background. My problem is that the full image doesn't appear on the wallpaper. It is always clipped and missing objects from the bottom and side views of the wallpaper. I've tried to crop the photo, to resize the image, and I also tried to change the resolution to match that of my emulator. None of this works. Do any of you know how to display the full image using the code below:
Bitmap background = BitmapFactory.decodeResource(getResources(), R.drawable.testimg2);
try {
wpm.setBitmap(background);
}catch(...){
....
}
Updated code (that still crops the image):
int width = display.getWidth();
int height = display.getHeight();
Log.v("WALLPAPER", "width and height are " + width + " " + height);
Bitmap background = BitmapFactory.decodeResource(getResources(), R.drawable.testimg2);
Bitmap scaled = Bitmap.createScaledBitmap(background, width, height, true);