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


Last Updated:

  1. worked

    worked New Member This Topic's Starter

    Joined:
    Dec 8, 2010
    Messages:
    3
    Likes Received:
    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?
     

    Advertisement
  2. worked

    worked New Member This Topic's Starter

    Joined:
    Dec 8, 2010
    Messages:
    3
    Likes Received:
    0
    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?
     

Share This Page

Loading...