Difference between revisions of "Application:setOrientation"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
 
Sets the orientation of the application. Accepted values are:<br />
 
Sets the orientation of the application. Accepted values are:<br />
 
<br />
 
<br />
Line 11: Line 11:
 
&lt;li&gt;Application.LANDSCAPE_RIGHT = &quot;landscapeRight&quot;&lt;/li&gt;<br />
 
&lt;li&gt;Application.LANDSCAPE_RIGHT = &quot;landscapeRight&quot;&lt;/li&gt;<br />
 
&lt;/ul&gt;<br />
 
&lt;/ul&gt;<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Application:setOrientation(orientation)
 
  Application:setOrientation(orientation)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''orientation''': (string) <br/>
+
'''orientation''': (string) <translate></translate> <br/>
 
=== Examples ===
 
=== Examples ===
 
'''Example'''<br/>
 
'''Example'''<br/>
<source lang="lua">application:setOrientation(Application.PORTRAIT)            -- the buttons are on the bottom<br />
+
<source lang="lua">application:setOrientation(Application.PORTRAIT)            -- the buttons are on the bottom
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top<br />
+
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top
application:setOrientation(Application.LANDSCAPE_LEFT)      -- the buttons are on the right side<br />
+
application:setOrientation(Application.LANDSCAPE_LEFT)      -- the buttons are on the right side
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side<br /></source>
+
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side</source>

Revision as of 13:34, 23 August 2018

Available since: Gideros 2011.6

Description


Sets the orientation of the application. Accepted values are:

<ul>
<li>Application.PORTRAIT = "portrait"</li>
<li>Application.PORTRAIT_UPSIDE_DOWN = "portraitUpsideDown"</li>
<li>Application.LANDSCAPE_LEFT = "landscapeLeft"</li>
<li>Application.LANDSCAPE_RIGHT = "landscapeRight"</li>
</ul>

 Application:setOrientation(orientation)

Parameters

orientation: (string)

Examples

Example

application:setOrientation(Application.PORTRAIT)             -- the buttons are on the bottom
application:setOrientation(Application.PORTRAIT_UPSIDE_DOWN) -- the buttons are at the top
application:setOrientation(Application.LANDSCAPE_LEFT)       -- the buttons are on the right side
application:setOrientation(Application.LANDSCAPE_RIGHT)      -- the buttons are on the left side