User Tools

Site Tools


Privacy Policy


Version 2.50 is out since Jan 1st 2022

Frequently Asked Questions


Note for contributors

If you wish to create a new page in the DroidScript wiki, please click on the most appropriate namespace above and follow the notes for contributors there.

Because of spam, it has been necessary to add a CAPTCHA to the registration form and the save option for editing pages. You will not need to prove you are human if you are logged in, so please register.

Please feel free to improve any existing page, as well as adding new pages to increase the sum of public knowledge about DroidScript.

Formatting Syntax


Web View Example

//web view example
//Called when application is started. 
function OnStart() 
    //Create a layout with objects vertically centered. 
    lay = app.CreateLayout( "linear""VCenter,FillXY" );     
    //Create a web control. 
    web = app.CreateWebView( 11,"AllowZoom,Wide,AutoZoom",50 ); 
    //setup loading... progress
    web.SetOnProgress( web_OnProgess ); 
    //add web to layout
    lay.AddChild( web ); 
    //Create horizontal layout
    layHoriz = app.CreateLayout( "linear""Horizontal" ); 
    //Add horizontal layout to main layout. 
    lay.AddChild( layHoriz ); 
    //Add layout to app.     
    app.AddLayout( lay ); 
   //call load web page function
//Load web page
function loadWeb()
  //show progress bar
  //load url
  web.LoadUrl("" ); 
//Show page load progress. 
function web_OnProgess( progress ) 
  //update progress bar
  //get progress update
  app.Debug( "progress = " + progress ); 
  //hide progress dialog when page loads
  if( progress==100 ) app.HideProgressBar(); 
//handle orienation change 
function OnConfig()
  //resize web view on orientation change
sample_code/sample_web_view.txt · Last modified: 2014/12/15 09:58 (external edit)