• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Prevent Live Wallpaper orientation change when an application is opened and orientation is changed?

worked

Lurker
Dec 8, 2010
3
0
I'm having an orientation issue with a Live Wallpaper that I wrote. Basically the canvas will rotate depending on the application opened above it. I tested this and realized that the onSurfaceChanged() method is firing when I return to the home screen from a previously opened application who's orientation was changed.

I suppose a better question would be, why does my Live Wallpaper Surface Change when an application is opened and it's orientation changed? Is there a way to prevent my Live Wallpaper orientation from ever changing? Thanks, hope that makes sense?
 
So, I've determined that this line of code is the reason why my orientation is getting weird.

canvasSurface.translate(startPositionX, startPositionY);

I'm centering my TextPaint Object in the center via translate... is there a way to move my TextPaint Object without relying on the canvasSurface Object?
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones