在MIUI 10.2 Redmi设备上的锁定屏幕上未设置墙纸

时间:2019-09-27 05:07:58

标签: java android live-wallpaper android-wallpaper

我正在尝试在miui 10.2 Redmi设备的锁定屏幕上设置墙纸。

我可以使用以下代码设置主屏幕墙纸:

public override func selectionRects(for range: UITextRange) -> [UITextSelectionRect] {
    super.selectionRects(for: range).map {
        var selectionRect = $0
        selectionRect.rect.origin.y -= 2 // Left side of mutating operator isn't mutable: 'rect' is a get-only property
        return selectionRect
    }
}

但是当我尝试使用此代码设置锁屏墙纸时,它不起作用:

 wallpaperManager.setBitmap(crackedBitmap);

吐司正在打印已设置墙纸但未在锁定屏幕上显示

1 个答案:

答案 0 :(得分:0)

MIUI不允许使用,请选中thisthisthis

到目前为止,看来您无能为力。