var txtSize = 22; //Called when application is started. function OnStart() {     lay = app.CreateLayout( "linear", "FillXY" );     lay.SetBackground( "/Sys/Img/BlueBack.png" );       //Create a layout to hold the search controls     laySearch = app.CreateLayout( "Linear", "Horizontal, FillX, VCenter" );     laySearch.SetBackColor( "#000000" );     laySearch.SetPadding( 0, 0.01, 0, 0.01 );       //Create a TextEdit control for entering search text     txeSearch = app.CreateTextEdit( "", 0.85 );     txeSearch.SetTextSize( txtSize );       //Create a search button     btnSearch = app.CreateText( "[fa-search]", 0.1, -1, "FontAwesome" );     btnSearch.SetTextSize( txtSize );     btnSearch.SetOnTouch( btnSearch_OnTouch );       laySearch.AddChild( txeSearch );     laySearch.AddChild( btnSearch );     lay.AddChild( laySearch );       //Add layout to app.     app.AddLayout( lay ); } //Called when the search button is pressed function btnSearch_OnTouch( ev ) {     if( ev.action=="Down" )     {         this.SetTextSize( txtSize-4 );     }     else if( ev.action=="Up" )     {         this.SetTextSize( txtSize );             var searchText = txeSearch.GetText();         app.ShowPopup( "Search: " + searchText );     } }