The document defines functions that create a layout with buttons and a web view to load local, dynamic, and remote content. On start, it creates a vertical linear layout and adds a web view and horizontal button layout. The button functions load local HTML, generate dynamic HTML, and load a remote site into the web view. A progress function tracks and displays loading.
The document defines functions that create a layout with buttons and a web view to load local, dynamic, and remote content. On start, it creates a vertical linear layout and adds a web view and horizontal button layout. The button functions load local HTML, generate dynamic HTML, and load a remote site into the web view. A progress function tracks and displays loading.
The document defines functions that create a layout with buttons and a web view to load local, dynamic, and remote content. On start, it creates a vertical linear layout and adds a web view and horizontal button layout. The button functions load local HTML, generate dynamic HTML, and load a remote site into the web view. A progress function tracks and displays loading.
//(We could use a url like "file:///sdcard/MyPage.htm") function btnLocal_OnTouch() { web.LoadUrl( "file:///Sys/Html/Page.htm" ) }
//Called when user touches 'Dynamic' button.
function btnDynamic_OnTouch() { var html = "<html><head>"; html += "<meta name='viewport' content='width=device-width'>"; html += "</head><body>Hello Dynamic World!<br>"; html += "<img src='Img/Droid2.png'>"; html += "</body></html>"; web.LoadHtml( html, "file:///Sys/" ) }
//Called when user touches 'Remote' button.
function btnRemote_OnTouch() { app.ShowProgress("Loading...") web.LoadUrl( "http://www.bbc.co.uk" ) }