如何设置图像壁纸全图像背景屏幕。我的代码Android-设置壁纸我的完整图像
Bitmap bmap = BitmapFactory.decodeResource(getResources(),
R.drawable.splash);
DisplayMetrics outMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(outMetrics);
int w = outMetrics.widthPixels;
int h = outMetrics.heightPixels;
Bitmap wallpaper=Bitmap.createScaledBitmap(bmap, w, h, true);
WallpaperManager m = WallpaperManager.getInstance(getApplicationContext());
try {
m.setBitmap(wallpaper);
} catch (IOException e) {
e.printStackTrace();
}
我需要像全套墙纸
是从我的回答任何帮助。 –