Difference between revisions of "Application:getDeviceOrientation"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2014.01<br/> === Description === Get the device orientation (and not what is that in project properties as done with `getOrientation`)...")
 
m (Text replacement - "<source" to "<syntaxhighlight")
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2014.01<br/>
 
'''Available since:''' Gideros 2014.01<br/>
 +
'''Class:''' [[Application]]<br/>
 +
 
=== Description ===
 
=== Description ===
Get the device orientation (and not what is that in project properties as done with `getOrientation`).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">
+
 
(string), = Application:getDeviceOrientation()
+
<syntaxhighlight lang="lua">
</source>
+
(string) = application:getDeviceOrientation()
'''Returns''' (string) Values "portrait", "portraitUpsideDown", "landscapeLeft", "landscapeRight"<br/>
+
</syntaxhighlight>
 +
 
 +
=== Return values ===
 +
'''Returns''' (string) values can be: "portrait", "portraitUpsideDown", "landscapeLeft", "landscapeRight"
 +
 
 +
{{Application}}

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"