Quantcast
Channel: Android*
Viewing all articles
Browse latest Browse all 531

initialOrientation Property

$
0
0

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:

OrientationValue
Portrait0
Upside Down Portrait180
Landscape Right90
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

Viewing all articles
Browse latest Browse all 531


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>