“固定”纵向模式下的动态壁纸
我正在尝试找到“最简单”的方法来修复纵向模式下的动态壁纸,就目前而言,我发现的唯一方法是将整个画布逆时针旋转 90 度,并将其“向下”移动设备处于横向模式时的屏幕宽度尺寸。 但这个解决方案效果不是很好,我认为这是无效率的(因为我有很多位图在不同的位置)。
有没有人找到一种更简单有效的解决方案来人为地以一种方向模式修复动态壁纸?
I'm trying to find the "simplest" way to fix my live wallpaper in portrait mode, and, as for now, the only way I found is to rotate the entire canvas by 90 degrees counter-clockwise and shift it "down" by the screen width size when the device is in landscape mode.
But this solution doesn't work very well, and I think that's inneficient (cause I have a lot of bitmaps in different positions).
Did anyone find a simpler and efficient solution to artificially fix a live wallpaper in just one orientation mode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您看一下 google 提供的示例,就会发现有一个 onSurfacedChanged() 方法可以处理屏幕旋转。我还没有测试过,但是如果你不在那里进行任何调用,我认为表面不会改变。
http://developer.android .com/resources/samples/CubeLiveWallpaper/src/com/example/android/livecubes/cube1/CubeWallpaper1.html
If you take a look at the example google gives, there's an onSurfacedChanged() Method that handles screen rotations. I haven't tested it out yet, but if you don't make any calls there, I think the surface will not change.
http://developer.android.com/resources/samples/CubeLiveWallpaper/src/com/example/android/livecubes/cube1/CubeWallpaper1.html