AppStudio 3: Orientation Control

There is no way to stop someone from rotating their device. The screen is refreshes and your app probably doesn’t fit anymore. There are several ways to deal with this:

  1. Calculate new sizes and positions for all the controls and move them around.
  2. Compile using PhoneGap, setting its orientation preference to not rotate your app.
  3. Take advantage of the opportunity to display something else – like a status report.
  4. Use the new Orientation control to ask your user to rotate back.

In this post, we’ll discuss the last option.

Orientation

The Orientation control displays the above warning when an app designed to be used in Portrait mode is run on a device in Landscape. When the user rotates back, the warning disappears.

To add it to your project, double click on it in the ToolBox. It only has one property that does anything: screenOrientation can be set to ‘Portrait’ or ‘Landscape’. When the device is put into a different orientation, the message displays.