Android Question don't execute OverrideUrl in webview

Oldmanenzo

Member
Licensed User
Longtime User
I have this activity where there are 3 buttons and a webview
Why don't execute command Sub Web_OverrideUrl (Url As String) As Boolean
selecting a row in the webview ??
I see this in debug mode
the webview is filled regularly of its fields from the database

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private BtnApri As Button
    Private BtnDelete As Button
    Private BtnEsci As Button
    Private Web As WebView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
    Activity.LoadLayout ("OpenTable")
    If Main.status ="Apri" Then
        BtnApri.Enabled =True
    Else
        BtnDelete.Enabled =True
    End If
    Web.Width =Activity.Width -20dip :Web.left=10dip :Web.Top=10dip
    BtnDelete.Left =(Activity.Width /2) - (BtnDelete.Width /2)
    BtnApri.Left =BtnDelete.Left - BtnApri.Width - 10dip
    BtnEsci.Left =BtnDelete.Left + BtnEsci.Width + 10dip
    ShowTableInWebView
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub BtnEsci_Click
  
End Sub
Sub BtnDelete_Click
  
End Sub
Sub BtnApri_Click
  
End Sub

Sub ShowTableInWebView
    Web.Visible =True
    Web.LoadHtml (DBUtils.ExecuteHtml (Main.SQL, "SELECT Id_Diario, Titolo, Nome, Nick, Equipaggio, Itinerario, Premessa " _
        &"FROM Diario ORDER BY Id_Diario", Null, 0, False))
End Sub
Sub Web_OverrideUrl (Url As String) As Boolean
    'parse the row and column numbers from the URL
    Dim values() As String
    values = Regex.Split("[.]", Url.SubString(7))
    Dim col, row As Int
    col = values(0)
    row = values(1)
    ToastMessageShow("User pressed on column: " & col & " and row: " & row, False)
    Return True 'Don't try to navigate to this URL
End Sub
 
Top