This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sample_code:sample_web_view [2014/12/15 01:35] 170.178.251.101 created |
sample_code:sample_web_view [2014/12/15 09:58] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | **Web View Example** | + | ====== |
+ | <file java webview.js> | ||
+ | // | ||
+ | // | ||
+ | function OnStart() | ||
+ | { | ||
+ | // | ||
+ | lay = app.CreateLayout( " | ||
+ | // | ||
+ | web = app.CreateWebView( 1, | ||
+ | // | ||
+ | web.SetOnProgress( web_OnProgess ); | ||
+ | |||
+ | // | ||
+ | lay.AddChild( web ); | ||
+ | |||
+ | // | ||
+ | layHoriz = app.CreateLayout( " | ||
+ | |||
+ | // | ||
+ | lay.AddChild( layHoriz ); | ||
+ | |||
+ | // | ||
+ | app.AddLayout( lay ); | ||
+ | |||
+ | // | ||
+ | loadWeb() | ||
+ | } | ||
+ | |||
+ | |||
+ | // | ||
+ | |||
+ | |||
+ | // | ||
+ | function loadWeb() | ||
+ | { | ||
+ | // | ||
+ | app.ShowProgressBar(" | ||
+ | // | ||
+ | web.LoadUrl(" | ||
+ | } | ||
+ | |||
+ | // | ||
+ | function web_OnProgess( progress ) | ||
+ | { | ||
+ | // | ||
+ | app.UpdateProgressBar(progress); | ||
+ | // | ||
+ | app.Debug( " | ||
+ | // | ||
+ | if( progress==100 ) app.HideProgressBar(); | ||
+ | } | ||
+ | |||
+ | // | ||
+ | function OnConfig() | ||
+ | { | ||
+ | // | ||
+ | web.SetSize(1, | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </ |