gpt4 book ai didi

android - 如何使用代码更改android中的锁屏壁纸?

转载 作者:太空狗 更新时间:2023-10-29 16:36:58 24 4
gpt4 key购买 nike

<分区>

我可以更改主屏幕壁纸,但我无法更改锁屏壁纸,

                DisplayMetrics metrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(metrics);
// get the height and width of screen
int height = metrics.heightPixels;
int width = metrics.widthPixels;

WallpaperManager wallpaperManager = WallpaperManager
.getInstance(getApplicationContext());

wallpaperManager.setBitmap(bitmap);


wallpaperManager.suggestDesiredDimensions(width, height);

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com