I am using webview and trapping any urls that the user clicks on using the below event:
Running on Android 4.4, everything works fine. But if I run this same code on 7.1.1 and even if the user selects "No" (meaning the intent wasn't executed), when focus returns to the webview, the webview content/page is very unresponsive - doesn't scroll easily, and any subsequent loading of html into the webview again is not visible until the user touches inside the webview control - and even then, the webview page won't scroll. You need to exit the app completely and rerun it for the webview to work properly again, that is until the user clicks on another link and the problem comes back.
If I simply substitute MsgBox instead of MsgBox2, then the problem go away. So there is some kind of weird conflict between the WV and the use of MsgBox2 in this event.
I even tried using the MsgBox2Async version thinking that maybe the issue is with blocking code, but I can't because the wv_Override Sub returns a Boolean and can't be resumable
As a workaround, I replaced the MsgBox2 with this
so now the MsgBox2 is in the AskURL sub, which works.
B4X:
Sub wv_OverrideUrl (Url As String) As Boolean
Select Case Msgbox2(URL,"Display URL?","Yes","","No",Null)
Case DialogResponse.POSITIVE
'use intent to display the URL in an outside browser
End Select
Return True
End Sub
Running on Android 4.4, everything works fine. But if I run this same code on 7.1.1 and even if the user selects "No" (meaning the intent wasn't executed), when focus returns to the webview, the webview content/page is very unresponsive - doesn't scroll easily, and any subsequent loading of html into the webview again is not visible until the user touches inside the webview control - and even then, the webview page won't scroll. You need to exit the app completely and rerun it for the webview to work properly again, that is until the user clicks on another link and the problem comes back.
If I simply substitute MsgBox instead of MsgBox2, then the problem go away. So there is some kind of weird conflict between the WV and the use of MsgBox2 in this event.
I even tried using the MsgBox2Async version thinking that maybe the issue is with blocking code, but I can't because the wv_Override Sub returns a Boolean and can't be resumable
As a workaround, I replaced the MsgBox2 with this
B4X:
CallSubDelayed2(Me,"AskURL",URL)
Last edited: