This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
app_methods:setorientation [2015/02/22 10:11] octazid [app.GetOrientation] |
app_methods:setorientation [2015/03/27 03:25] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====app.SetOrientation===== | + | =====SetOrientation===== |
- | (Samples taken from the Droidscript documentation)\\ \\ The **SetOrientation** method forces the screen to either " | + | //(Samples taken from the Droidscript documentation)//\\ \\ The **SetOrientation** method forces the screen to either " |
+ | < | ||
+ | ====Example==== | ||
<code javascript> | <code javascript> | ||
function OnStart() | function OnStart() | ||
{ | { | ||
- | app.SetOrientation( " | + | app.SetOrientation( " |
lay = app.CreateLayout( " | lay = app.CreateLayout( " | ||
Line 11: | Line 13: | ||
lay.AddChild( txt ); | lay.AddChild( txt ); | ||
app.AddLayout( lay ); | app.AddLayout( lay ); | ||
- | }</ | + | } |
- | =====app.GetOrientation===== | + | function OnOrientationChanged() |
- | The **GetOrientation** method gets the current orientation of the phone/ | + | { |
+ | app.ShowPopup( " | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | =====GetOrientation===== | ||
+ | |||
+ | The **GetOrientation** method gets the current orientation of the phone/ | ||
+ | < | ||
+ | ====Example==== | ||
<code javascript> | <code javascript> | ||
function OnStart() | function OnStart() | ||
Line 22: | Line 34: | ||
} | } | ||
</ | </ | ||
- | =====app.GetDefaultOrientation===== | + | |
+ | =====GetDefaultOrientation===== | ||
The **GetDefaultOrientation** method gets the default (normal) orientation of the device. It will return either the value " | The **GetDefaultOrientation** method gets the default (normal) orientation of the device. It will return either the value " | ||
+ | < | ||
+ | ====Example==== | ||
<code javascript> | <code javascript> | ||
function OnStart() | function OnStart() |