我想获取手机当前的壁纸并将该图像设置为应用程序的背景图像。我试过这种方式,但它显示运行时异常
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
layout.setBackground(wallpaperDrawable);
我想获取手机当前的壁纸并将该图像设置为应用程序的背景图像。我试过这种方式,但它显示运行时异常
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
layout.setBackground(wallpaperDrawable);