← Back to team overview

ubuntu-phone team mailing list archive

Re: [Ubuntu-touch-coreapps] [Design] Responding to orientation

 

On 05/08/2013 07:27 PM, Nicolas Cook Leon wrote:
> It seems that Ubuntu Touch isn't locked. It looks like certain screens
> just don't support the other orientation. Running it on my Nexus 7 has
> practically everything portrait-only, so I thought it was locked until
> I tried the video player, which supports both orientations. That makes
> me think you'll need to build it into your own applications for now,
> at least.
This was postedearlier in the thread, does it answer your question? The
shell itself is not yet supporting rotation.

And to make the apps developers lives easier the Ubuntu UI Toolkit has
added a simple way to enable automatic rotation of an app depending on
the orientation of the device. If you are using MainView then simply set
the 'automaticOrientation' property to true:

http://developer.ubuntu.com/api/ubuntu-12.10/qml/mobile/qml-ubuntu-components0-mainview.html#automaticOrientation-prop


Just make sure that your app layout responds well to size changes and it
is likely that it will also respond well to orientation changes
(changing the orientation is equivalent to changing the aspect ratio of
the app window, width becomes the height and height becomes the width).

Florian

>
>
> On Wed, May 8, 2013 at 1:37 PM, John Nelson <thatguruguy@xxxxxxxxx
> <mailto:thatguruguy@xxxxxxxxx>> wrote:
>
>     That's exactly why there needs to be an option to lock rotation
>     for an e-reader.
>
>     My other question remains unanswered: does Ubuntu Touch support
>     rotation yet? I'd like to know because I'm maintaining the
>     device-specific part for the Samsung Galaxy Tab 2 7.0, and right
>     now it's hard-coded to be locked into landscape mode, because the
>     early port was locked in portrait mode. I'd prefer not having to
>     hard-code the orientation if I don't have to.
>
>     On May 8, 2013 9:52 AM, "Rasmus Eneman" <Rasmus@xxxxxxxxx
>     <mailto:Rasmus@xxxxxxxxx>> wrote:
>
>         When you lie down it needs to be locked. And yeah, it should
>         be an option (that is simple to change, ie. on the toolbar)
>
>
>         2013/5/8 Joey Jiao <joey.jiaojg@xxxxxxxxx
>         <mailto:joey.jiaojg@xxxxxxxxx>>
>
>             hey, why lock for ereader? at least keep an option for the
>             user to select if orient
>
>             ? 2013-4-30 ??7:55,"John Nelson" <thatguruguy@xxxxxxxxx
>             <mailto:thatguruguy@xxxxxxxxx>> ??:
>
>                 I have another follow-up question. For some apps
>                 (e.g., an e-reader, once we get one), it would be
>                 useful to have the ability to lock the orientation.
>                 Will that functionality be built into the SDK?
>
>                 Also, does anyone have any idea when Ubuntu Touch will
>                 be able to respond to the orientation of the device?
>                 The device-specific part of the build I use (for a
>                 Samsung Galaxy 2 7.0 tablet) is hard-coded for
>                 landscape mode. Is that still a necessary hack?
>
>                 On Apr 29, 2013 7:42 PM, "Sergio Schvezov"
>                 <sergio.schvezov@xxxxxxxxxxxxx
>                 <mailto:sergio.schvezov@xxxxxxxxxxxxx>> wrote:
>
>                     On Tue, Apr 30, 2013 at 01:33:34AM +0200,
>                     Nekhelesh Ramananthan wrote:
>                     > Hi Florian,
>                     >
>                     > Thanks for that. However on interchanging the
>                     width and height to simulate
>                     > the landscape orientation, I noticed that the
>                     core apps like Weather,
>                     > Clock, Calculator etc do not adapt well to the
>                     new orientation. Is there
>                     > sample code we core app developers could look at
>                     to get an idea on how to
>                     > make our app respond well to different orientations?
>
>                     I actually have a followup question, how are
>                     sidestige apps affected with
>                     orientation changes?
>
>                     Cheers
>                     Sergio
>
>
>                     --
>                     Mailing list: https://launchpad.net/~ubuntu-phone
>                     <https://launchpad.net/%7Eubuntu-phone>
>                     Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>                     <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
>                     Unsubscribe : https://launchpad.net/~ubuntu-phone
>                     <https://launchpad.net/%7Eubuntu-phone>
>                     More help   : https://help.launchpad.net/ListHelp
>
>
>                 --
>                 Mailing list: https://launchpad.net/~ubuntu-phone
>                 <https://launchpad.net/%7Eubuntu-phone>
>                 Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>                 <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
>                 Unsubscribe : https://launchpad.net/~ubuntu-phone
>                 <https://launchpad.net/%7Eubuntu-phone>
>                 More help   : https://help.launchpad.net/ListHelp
>
>
>             --
>             Mailing list: https://launchpad.net/~ubuntu-phone
>             <https://launchpad.net/%7Eubuntu-phone>
>             Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>             <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
>             Unsubscribe : https://launchpad.net/~ubuntu-phone
>             <https://launchpad.net/%7Eubuntu-phone>
>             More help   : https://help.launchpad.net/ListHelp
>
>
>
>
>         -- 
>         Rasmus Eneman
>
>
>     --
>     Mailing list: https://launchpad.net/~ubuntu-phone
>     <https://launchpad.net/%7Eubuntu-phone>
>     Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>     <mailto:ubuntu-phone@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~ubuntu-phone
>     <https://launchpad.net/%7Eubuntu-phone>
>     More help   : https://help.launchpad.net/ListHelp
>
>
>
>


Follow ups

References