开发者

Live Wallpaper picker detection

开发者 https://www.devze.com 2023-04-02 10:46 出处:网络
When a live wallpaper is being previewed in the Live Wallpaper Preview, it se开发者_如何学Goems that the xOffset and yOffset are set to 0.This results in the preview always showing one corner of the s

When a live wallpaper is being previewed in the Live Wallpaper Preview, it se开发者_如何学Goems that the xOffset and yOffset are set to 0. This results in the preview always showing one corner of the scene. In most cases, it would be preferable to show the center of the scene.

Is there any way to detect whether the surface view is in the live wallpaper picker instead of as the wallpaper, so the code can react to the 0 offsets?


Found the answer. In your Engine, sometime after onCreate() is first called, call isPreview() to find out.

0

精彩评论

暂无评论...
验证码 换一张
取 消