Difference between revisions of "Application:getDeviceOrientation"

From GiderosMobile
m
m (Text replacement - "<source" to "<syntaxhighlight")
 
(One intermediate revision by the same user not shown)
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()
</source>
+
</syntaxhighlight>
  
 
=== Return values ===
 
=== Return values ===

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"