Changing the orientation

Hi All,

Just a quick question - How would one go about changing the Orientation of the device (I.e from landscape to portrait) when there is an event (Like a web page is opened) or a button being clicked.

Many thanks!

Hi Matthew,

I don’t think you can have your code cause a change the orientation.  The user has to cause it by actually turning their device physically.  But you can set up your code to listen in and respond to orientation changes.  Check out the orientation event documentation here: http://docs.coronalabs.com/api/event/orientation/index.html.

  • Andrew

Hi Matthew,

I don’t think you can have your code cause a change the orientation.  The user has to cause it by actually turning their device physically.  But you can set up your code to listen in and respond to orientation changes.  Check out the orientation event documentation here: http://docs.coronalabs.com/api/event/orientation/index.html.

  • Andrew