选择壁纸而不是选择动态壁纸?

时间:2014-03-14 02:21:05

标签: android android-intent gallery live wallpaper

在Android中,有一种非常方便的方式让用户选择和设置动态壁纸。

Intent intent = new Intent(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER);
startActivity(intent);

用户是否有类似的方式来选择和设置壁纸(或者更好的是,允许他们选择壁纸/动态壁纸/画廊)?

谢谢!

2 个答案:

答案 0 :(得分:1)

试试这个:

private void chooseWallpaper() {

final Intent pickWallpaper = new Intent(Intent.ACTION_SET_WALLPAPER);
Intent chooser = Intent.createChooser(pickWallpaper, getText(R.string.chooser_wallpaper));
startActivityForResult(chooser, REQUEST_PICK_WALLPAPER);
}

答案 1 :(得分:0)

试试这个

public void setIt(){

Context c = this.getBaseContext();
Bitmap bp = BitmapFactory.decodeResource(getResources(), "your_array");
c.setWallpaper(bp);
}