Application:setOrientation: Difference between revisions
From GiderosMobile
No edit summary |
m →Description: fixed some html tags |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
<languages /> | <languages /> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6 | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]]<br/> | <br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/Application|Application]] | |||
<br/> | |||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
<translate | <translate> | ||
Sets the orientation of the application. Accepted values are: | Sets the orientation of the application. Accepted values are: | ||
* Application.PORTRAIT | |||
* Application.PORTRAIT_UPSIDE_DOWN | |||
* Application.LANDSCAPE_LEFT | |||
* Application.LANDSCAPE_RIGHT | |||
</translate> | |||
<br/> | |||
<br / | |||
<source lang="lua"> | <source lang="lua"> | ||
application:setOrientation(orientation) | |||
</source> | </source> | ||
=== <translate>Parameters</translate> === | === <translate>Parameters</translate> === | ||
'''orientation''': (string) <translate></translate> <br/> | '''orientation''': (string) <translate></translate> | ||
<br/> | |||
=== <translate>Examples</translate> === | === <translate>Examples</translate> === | ||
<source lang="lua"> | |||
<source lang="lua">application:setOrientation(Application.PORTRAIT) -- the buttons are on the bottom | 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</source> | application:setOrientation(Application.LANDSCAPE_RIGHT) -- the buttons are on the left side | ||
</source> | |||
<br/> | |||
<br/> | |||
Revision as of 00:23, 13 June 2019
Available since: Gideros 2011.6
Class: Application
Description
Sets the orientation of the application. Accepted values are:
- Application.PORTRAIT
- Application.PORTRAIT_UPSIDE_DOWN
- Application.LANDSCAPE_LEFT
- Application.LANDSCAPE_RIGHT
application:setOrientation(orientation)
Parameters
orientation: (string)
Examples
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