This property returns the initial orientation of the device
intel.xdk.device.initialOrientation
Description:
This property returns the current orientation of the device. It will return one of the following values:
Orientation | Value |
Portrait | 0 |
Upside Down Portrait | 180 |
Landscape Right | 90 |
Landscape Left | -90 |
Example:
//detect the initial orientation of the device
if (intel.xdk.device.initialOrientation == "90" || intel.xdk.device.initialOrientation == "-90")
{
//landscape
}
else
{
//portrait
}
Version:
This property is available in appMobi Version 3.0.0
English