Removes a drawer layout from a given side.
Example - left
function OnStart()
{
lay = app.CreateLayout( "Linear", "FillXY,VCenter" );
txt1 = app.CreateText( "<-- swipe" );
txt1.SetTextSize( 30 );
lay.AddChild( txt1 );
app.AddLayout( lay );
layDrawer = app.CreateLayout( "Linear", "FillXY,VCenter" );
layDrawer.SetBackground( "/Sys/Img/BlueBack.jpg" );
btn = app.CreateButton( "Remove" );
btn.SetOnTouch( RemoveDrawer );
layDrawer.AddChild( btn );
app.AddDrawer( layDrawer, "left", 0.8 );
}
function RemoveDrawer() {
app.RemoveDrawer( "left" );
}
from native import app
def OnStart():
lay = app.CreateLayout("Linear", "FillXY,VCenter")
txt1 = app.CreateText("<-- swipe")
txt1.SetTextSize(30)
lay.AddChild(txt1)
app.AddLayout(lay)
layDrawer = app.CreateLayout("Linear", "FillXY,VCenter")
layDrawer.SetBackground("/Sys/Img/BlueBack.jpg")
btn = app.CreateButton("Remove")
btn.SetOnTouch(RemoveDrawer)
layDrawer.AddChild(btn)
app.AddDrawer(layDrawer, "left", 0.8)
def RemoveDrawer():
app.RemoveDrawer("left")