- WallpaperManager wallpaperManager = WallpaperManager.getInstance(this);
- imageView.setDrawingCacheEnabled(true);
- wallpaperManager.setBitmap(imageView.getDrawingCache());
- 需要权限:
- <uses-permission android:name="android.permission.SET_WALLPAPER" />
- //该片段来自于http://www.codesnippet.cn/detail/1411201410977.html
来源: http://www.codesnippet.cn/detail/1411201410977.html