Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Private wvTur As WebView
Dim NameBar, AddressBar As String
Dim MyWebViewExtras As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
NameBar = "Gondola Restaurant"
AddressBar = "Philadelphia Street"
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("webpage1")
wvTur.JavaScriptEnabled=True
MyWebViewExtras.addJavascriptInterface(wvTur, "B4A")
wvTur.LoadHtml("<html><body><h3>" & NameBar & "</h3><p>Address:<br/><strong>" & AddressBar & "</strong></p> " & "<p>Telephone:<br/><strong>5555-7777</strong></p>"& "<button onclick='B4A.CallSub('MyB4ASub', true)'"&">Show Activity</button>"&"</body></html>")
wvTur.ZoomEnabled = False
End Sub
Sub MyB4ASub
' this Sub will be called by the onclick event of the image
StartActivity(Activity2)
End Sub