User Tools

Site Tools


built_in:webview

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
built_in:webview [2015/04/18 10:26]
octazid add new methods and delete false
built_in:webview [2018/08/16 08:46] (current)
Line 6: Line 6:
 You can create a control to display local or remote web pages in your App using the **CreateWebView** method of the **[[built_in:app|app]]** object: You can create a control to display local or remote web pages in your App using the **CreateWebView** method of the **[[built_in:app|app]]** object:
 <code>web = app.CreateWebView( width, height, options, zoom );</code> <code>web = app.CreateWebView( width, height, options, zoom );</code>
 +options include **"IgnoreErrors", "NoScrollBars", "ScrollFade", "Overview", "AllowZoom", "UseBrowser"**.
 +
 If you are loading remote web pages, then you might want to use the **SetOnProgress** method to set the name of a callback function that you want called to report the progress of loading the page. If you are loading remote web pages, then you might want to use the **SetOnProgress** method to set the name of a callback function that you want called to report the progress of loading the page.
  
Line 24: Line 26:
 |[[tips_tricks:webview_navigate|WebView.CanGoBack()]] | | |[[tips_tricks:webview_navigate|WebView.CanGoBack()]] | |
 |WebView.CanGoForward() | | |WebView.CanGoForward() | |
 +|WebView.Capture(filename) |captures jpeg of visible page |
 |WebView.ClearHistory() | | |WebView.ClearHistory() | |
 |WebView.Execute( code ) | | |WebView.Execute( code ) | |
Line 37: Line 40:
 |WebView.LoadHtml( html,base,options ) | | |WebView.LoadHtml( html,base,options ) | |
 |WebView.LoadUrl( url,options ) | | |WebView.LoadUrl( url,options ) | |
 +|WebView.Print() |KitKat or later only |
 |WebView.SetBackColor( color ) | | |WebView.SetBackColor( color ) | |
 |WebView.SetBackGradient( color1,color2,color3,p4,p5,p6,p7 ) | | |WebView.SetBackGradient( color1,color2,color3,p4,p5,p6,p7 ) | |
Line 102: Line 106:
    var html = "<html><head>";    var html = "<html><head>";
    html += "<meta name='viewport' content='width=device-width'>";    html += "<meta name='viewport' content='width=device-width'>";
-   html += "</head><body>Hello World!<br>";+   html += "</head><body style='color:#fff'>Hello World!<br>";
    html += "<img src='Img/Droid2.png'>";    html += "<img src='Img/Droid2.png'>";
    html += "</body></html>";    html += "</body></html>";
built_in/webview.1429352803.txt.gz ยท Last modified: 2015/04/18 18:26 (external edit)