Difference between revisions of "Application:getDeviceOrientation"

From GiderosMobile
m (Text replacement - "</source" to "</syntaxhighlight")
m (Text replacement - "<source" to "<syntaxhighlight")
 
Line 5: Line 5:
 
Gets the device orientation (and not what is in project properties as done with ''getOrientation''). Please check Accelerometer example project for usage.
 
Gets the device orientation (and not what is in project properties as done with ''getOrientation''). Please check Accelerometer example project for usage.
  
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(string) = application:getDeviceOrientation()
 
(string) = application:getDeviceOrientation()
 
</syntaxhighlight>
 
</syntaxhighlight>

Latest revision as of 16:46, 12 July 2023

Available since: Gideros 2014.01
Class: Application

Description

Gets the device orientation (and not what is in project properties as done with getOrientation). Please check Accelerometer example project for usage.

(string) = application:getDeviceOrientation()

Return values

Returns (string) values can be: "portrait", "portraitUpsideDown", "landscapeLeft", "landscapeRight"