如何Android Studio LockScreen墙纸

时间:2018-11-29 12:13:43

标签: android lockscreen wallpapermanager

 private void UpdateMyWallpaper()
{
    myWallManager = WallpaperManager.getInstance(getApplicationContext());
    myDrawable = myWallManager.getDrawable();
    myCurrentWallpaper.setImageDrawable(myDrawable);
}

此工作壁纸,但我如何锁定屏幕壁纸设置

1 个答案:

答案 0 :(得分:1)

   private void UpdateMyLockWallpaper(){

    myWallManager = WallpaperManager.getInstance(this).setStream(inputStream, null, true, WallpaperManager.FLAG_LOCK);
    myDrawable = myWallManager.getDrawable();
    myCurrentWallpaper.setImageDrawable(myDrawable);
}