A webView is in Main activity with a local webpage, I am trying to do 'StartActivity2' from the webView in Main.
How to go from a local webpage in a WebView (Main) Activity, to Activity2?
B4X:
Sub Globals
Private wvTur As WebView
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("webpage1")
' This does create and load a WebView (Main) Activity.
wvTur.LoadHtml("<html><body><h3>" & NameBar & "</h3><p>Address:<br/><strong>" & AddressBar & "</strong></p> " & "<p>Telephone:<br/><strong>5555-7777</strong></p>"& "<FORM action='openActivity'><INPUT type='submit' value='Show Activity'></FORM>"&"</body></html>")
' This does not load a LOCAL web page into a WebView (Main) Activity. <<<
' Only the FORM appears in the Main Activity.
wvTur.LoadHtml("existingWebPage.htm" & "<FORM action='openActivity'><INPUT type='submit' value='Show Activity'></FORM>")
wvTur.ZoomEnabled = False
End Sub
B4X:
Sub wvtur_OverrideUrl(Url As String) As Boolean
' How to use this with a local webpage in a WebView (Main) Activity?
StartActivity(Activity2)
Return True
End Sub