So, I have been developing a wallpaper changer for a long time and got it. After some time, I began to receive comments so that the wallpaper did not change correctly. Also I tried different sizes of emus and they were right. I am scaling the bitmap correctly, etc., but somehow the android tends to scale the wallpaper even more! Is there any way to avoid this? My code is:
Display display = parent.getWindowManager().getDefaultDisplay(); int width = display.getWidth(); int height = display.getHeight(); Bitmap scaled = Bitmap.createScaledBitmap(wallpaper, width, height, true); WallpaperManager wm = WallpaperManager.getInstance(getContext()); wm.setBitmap(scaled);
I also tried other methods, but nothing helps, even if I later check if the wallpaper is changed correctly, etc. :( Any ideas?
source share