My wallpaper application's wallpapers doesn't fit for all devices. Images are 1080x1920px and in some devices, wallpapers are overflows and crops automatically.
Here is the code that I use to set wallpaper;
img.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
WallpaperManager wallmgr = WallpaperManager.getInstance(getApplicationContext());
try{
wallmgr.setResource(+ R.drawable.a1);
} catch (IOException e){
e.printStackTrace();
}
}
});
What can I do to fit images ?