Hi i am coding to set a Home Screen Wallpaper. It’s working fine. But my image pixel is totally damaged and then my wallpaper is not fit with the actual size of the home screen. I am try to workout different size of images. Unfortunately it’s not working for me. How to solve it.
My code is here
WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
Drawable drawable = getResources().getDrawable(R.drawable.newimage);
Bitmap wallpaper = ((BitmapDrawable) drawable).getBitmap();
try
{
wallpaperManager.setBitmap(wallpaper);
}
catch (IOException e)
{
e.printStackTrace();
}
My Screenshot Original Image

My Screenshot Android Emulator Home Screen

Why my original image is damaged here.
How to display My Original Image based on the Emulator Size.
You can try this: