Android WallpaperManager 同时设置桌面壁纸与锁屏的问题 |
您所在的位置:网站首页 › 桌面壁纸锁屏怎么设置 › Android WallpaperManager 同时设置桌面壁纸与锁屏的问题 |
最近项目中,需要给手机设置桌面壁纸与锁屏。 大家都知道使用 WallpaperManager.setStream()方法就好 @RequiresPermission(android.Manifest.permission.SET_WALLPAPER) public int setStream(InputStream bitmapData, Rect visibleCropHint, boolean allowBackup, @SetWallpaperFlags int which)其中,该方法的最后一个参数就是用来标记该图像是应用于桌面壁纸还是锁屏的。 @Retention(RetentionPolicy.SOURCE) public @interface SetWallpaperFlags {} /** * Flag: set or retrieve the general system wallpaper. */ public static final int FLAG_SYSTEM = 1 |
今日新闻 |
点击排行 |
|
推荐新闻 |
图片新闻 |
|
专题文章 |
CopyRight 2018-2019 实验室设备网 版权所有 win10的实时保护怎么永久关闭 |