“fixing” a live wallpaper in portrait mode
-
26-10-2019 - |
Question
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?
Solution
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.