[英]how set current wallpaper as my application background image Android?
我想獲取手機的當前牆紙並將該圖像設置為應用程序的背景圖像。 我嘗試過這種方式,但顯示運行時異常
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getDrawable();
layout.setBackground(wallpaperDrawable);
final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
final Drawable wallpaperDrawable = wallpaperManager.getFastDrawable();
getWindow().setBackgroundDrawable(wallpaperDrawable);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.