Removes a layout added to the app.
Example - Vertical
function OnStart()
{
lay = app.CreateLayout( "Linear", "FillXY,VCenter" );
txt = app.CreateText( "Hello" );
txt.SetTextSize( 50 );
lay.AddChild( txt );
btn = app.CreateButton( "Remove" );
btn.SetOnTouch( RemoveDrawer );
lay.AddChild( btn );
app.AddLayout( lay );
}
function RemoveDrawer() {
app.RemoveLayout( lay );
}
from native import app
def OnStart():
global lay
lay = app.CreateLayout( "Linear", "FillXY,VCenter" )
txt = app.CreateText( "Hello" )
txt.SetTextSize( 50 )
lay.AddChild( txt )
btn = app.CreateButton( "Remove" )
btn.SetOnTouch( RemoveDrawer )
lay.AddChild( btn )
app.AddLayout( lay )
def RemoveDrawer():
app.RemoveLayout( lay )