Sub Activity_Create(FirstTime As Boolean)
webview.Initialize("webview")
Activity.AddView(webview, 0, 0, 100%x, 100%y)
webviewextras1.Initialize(webview)
Dim WebChromeClient1 As DefaultWebChromeClient
WebChromeClient1.Initialize("progress")
webviewextras1.SetWebChromeClient(WebChromeClient1)
Dim WebViewClient1 As DefaultWebViewClient
WebViewClient1.Initialize("WebViewClient1")
webviewextras1.SetWebViewClient(WebViewClient1)
webviewextras1.LoadUrl(url)
Dim progresslbl As Label
Dim Percentage As ProgressBar
Percentage.Initialize("")
Percentage.Progress = 0
Percentage.Color = Colors.Black
Activity.AddView(Percentage, 0dip, 50%y, 100%x, 30dip)
progresslbl.Initialize("")
Activity.AddView(progresslbl,50%x,Percentage.Top,50%x,40dip)
progresslbl.SetLayout(50%x - progresslbl.Width/2,50%y,50%x,40dip)
progresslbl.Gravity = Gravity.CENTER_HORIZONTAL
progresslbl.Text = "Please Wait..."
End Sub
Sub progress_ProgressChanged(NewProgress As Int)
Log("WebView1 loading progress: "&NewProgress&"%")
Percentage.Progress = NewProgress
If NewProgress = 100 Then
progresslbl.Visible = False
Percentage.Visible = False
End If
Log(webview.Url)
End Sub