如何设置图像壁纸全图像背景屏幕。我的代码
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();
}
我需要图片全套壁纸