AddDrawer adds layout as drawer on 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" );
txt2 = app.CreateText( "Hello" );
txt2.SetTextSize( 40 );
layDrawer.AddChild( txt2 );
app.AddDrawer( layDrawer, "left", 0.8 );
}
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" )
txt2 = app.CreateText( "Hello" )
txt2.SetTextSize( 40 )
layDrawer.AddChild( txt2 )
app.AddDrawer( layDrawer, "left", 0.8 )