2

I successfully retrieved the selected wallpaper from wallpaper manager and applied it to my app background with this code:

`

    LinearLayout parent = (LinearLayout) findViewById(R.id.linearLayoutParent);

    final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
    final Drawable wallpaperDrawable = wallpaperManager.getDrawable();

    parent.setBackgroundDrawable(wallpaperDrawable);

`

But this code doesn't work if the selected wallpaper is a live wallpaper, i just searched for a solution in google and didn't find any.

4

0 回答 0