24

I am working on a reader app to be used on Ubuntu-Touch. When reading books from the app it would be a helpful feature to lock the orientation in either portrait or landscape. This would be useful when reading in bed sideways.

I've tried to use automaticOrientation = false or true, however, the SDK currently locks the orientation in portrait when set to false.

Is there a way to lock the orientation of the device screen in one or the other and have it stay locked?

Update:

Newer releases of Ubuntu for Phone have a global option to lock orientation, however, I would still like to do this at the app level.

I am still looking for a way to do this.

αғsнιη
  • 35,660
Randy_O
  • 430
  • 1
    I always disliked this when android apps did this, and would be glad if that control stayed on a system level. it is in a quick pull down. – Mateo Dec 02 '14 at 17:35

2 Answers2

1

Unfortunately there's no way yet to set a certain orientation programatically. You can however lock the orientation for your app on a certain one (portrait or landscape) in your app's desktop file. See the following link: https://wiki.ubuntu.com/Unity8/FullShellRotation. The feature has been released some time ago, and perhaps you already use that.

-1

Is this still a problem for you? Perhaps exposing the system level functionality through your app's UI might be the best way to go. I suspect locking at the app level would be considered a bug by the system developers so it's not offered.

grantbow
  • 976