Set the display orientation to a fixed value.
Example - Change Orientation
function OnStart()
{
lay = app.CreateLayout( "linear", "VCenter,FillXY" );
spn = app.CreateSpinner( "Default,Landscape,ReverseLandscape,Portrait,ReversePortrait", 0.3, 0.1 );
spn.SetOnChange( SetOrientation );
lay.AddChild( spn );
app.AddLayout( lay );
}
function SetOrientation( orient )
{
app.SetOrientation( orient )
}
from native import app
def OnStart():
lay = app.CreateLayout( "linear", "VCenter,FillXY" )
spn = app.CreateSpinner( "Default,Landscape,ReverseLandscape,Portrait,ReversePortrait", 0.3, 0.1 )
spn.SetOnChange( SetOrientation )
lay.AddChild( spn )
app.AddLayout( lay )
def SetOrientation( orient, index):
app.SetOrientation( orient )