0
我正在开发一款安卓壁纸应用,其中我使用了一个包含不同图像视图的viewFlipper。我在viewFlipper上有滑动动画,我想将viewflipper中显示的当前图像设置为壁纸。如何将viewFlipper的imageView中的图像设置为壁纸?
我正在开发一款安卓壁纸应用,其中我使用了一个包含不同图像视图的viewFlipper。我在viewFlipper上有滑动动画,我想将viewflipper中显示的当前图像设置为壁纸。如何将viewFlipper的imageView中的图像设置为壁纸?
you should get the image and make it into bitmap at first. Once you have the bitmap of that image use the following :
WallpaperManager wallpaper = WallpaperManager.getInstance(getApplicationContext());
try{
wallpaper.setBitmap(yourBitmap);
catch(IOException e){
e.printStackTrace();
}
}