Application:getDeviceOrientation: Difference between revisions

From GiderosMobile
mNo edit summary
m Text replacement - "</source" to "</syntaxhighlight"
Line 7: Line 7:
<source lang="lua">
<source lang="lua">
(string) = application:getDeviceOrientation()
(string) = application:getDeviceOrientation()
</source>
</syntaxhighlight>


=== Return values ===
=== Return values ===

Revision as of 15:33, 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.

<source lang="lua"> (string) = application:getDeviceOrientation() </syntaxhighlight>

Return values

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