system.setOrientation(...)

Are there plans to expose the set orientation functionality of iOS and Android?

iOS:
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeLeft];

Android:
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

I know that you can set the default/start orientation in the build.settings file, but withing an app I am designing I want the ability to have certain portions display in landscape and others in portrait.

Is there a way to currently do this that I am just not seeing? It seems like my only option is to force the orientation to potrait and for the portions that need to be landscape rotate all of the on screen elements 90 degrees and swap all x and y values (or vice versa - force landscape and then switch for portrait).

Correct me if I am wrong, but that link merely explains how to handle the event of an orientation change.

What I sent to be able to do is call something like...

System.setOrientation("portrait")

or

System.setOrientation("landscapeleft")

so that the x,y coordinates will have their 0,0 location be at the expected location.

Well you could modify that code to use it when you wanted the orientation to change and not simply when the user rotated their device.

However I do understand what you're suggesting/requesting and I will bring it up in our next meeting.

Peach :)

Thanks :)

Hi all,

Has there been any progress on this issue.
I too would like to be able to force a particular scene into portrait mode.

Assigning "system.orientation" doesn't seem to work

I am writing a game in landscape mode.
The game includes a shared settings page that we use in all of our games (most of them are in portrait)
Therefore, the settings page is currently optimized for portrait
The shared settings page includes many text-fields.

The scene that I have uses native text-field controls and I need the keyboard to also be forced to be rotated into portrait

Thanks

views:2253 update:2011/9/17 18:17:57
corona forums © 2003-2011