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: | ||
<li>Application.LANDSCAPE_RIGHT = "landscapeRight"</li><br /> | <li>Application.LANDSCAPE_RIGHT = "landscapeRight"</li><br /> | ||
</ul><br /> | </ul><br /> | ||
− | <br /> | + | <br /></translate> |
<source lang="lua"> | <source lang="lua"> | ||
Application:setOrientation(orientation) | Application:setOrientation(orientation) | ||
</source> | </source> | ||
=== Parameters === | === Parameters === | ||
− | '''orientation''': (string) | + | '''orientation''': (string) <translate></translate> <br/> |
=== Examples === | === Examples === | ||
'''Example'''<br/> | '''Example'''<br/> | ||
− | <source lang="lua">application:setOrientation(Application.PORTRAIT) -- the buttons are on the bottom | + | <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 | + | 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_LEFT) -- the buttons are on the right side |
− | application:setOrientation(Application.LANDSCAPE_RIGHT) -- the buttons are on the left side | + | 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