Android Question WebView - "Click" event

Declan

Well-Known Member
Licensed User
Longtime User
I am loading a WebView with data from a SQLite database.
Once loaded, is it possible to get the "Row" value from a "Click" event?

I have tried:
B4X:
Sub wbvQuery_OverrideUrl (Url As String) As Boolean
    'parse the row and column numbers from the URL
    Private values() As String
    values = Regex.Split("[.]", Url.SubString(7))
    Private Col, Row As Int
    Col = values(0)
    Row = values(1)
    Msgbox(MySPList.Get(Row),"")
End Sub
The above is from "SQLiteLight4" example

I am loading the wbvQuery WebView with:
B4X:
    'Create a temp table and loaded it with data from the list
    DBUtils.DropTable(SQL1, "temptableSP1")
    LOCALCreateSP1TempTable
    For i=0 To MySPList.Size -1
        Dim CC() As String=Regex.Split(TAB,MySPList.Get(i))
        SQL1.ExecNonQuery2("INSERT INTO temptableSP1 VALUES(?,?,?,?,?,?,?,?,?)", CC)
    Next
 
    'Load temp table onto a webview
    ClearWebViewCache
    Dim Query As String ="SELECT  * FROM temptableSP1"
    wbvQuery.LoadHtml(DBUtils.ExecuteHtml(SQL1, Query, Null, 0, False))
    wbvQuery.Height = 25%y
    wbvQuery.Visible=True

The WebView loads fine with the data displayed.
When I "Click" on a row, nothing happens
 

DonManfred

Expert
Licensed User
Longtime User
What do you think will happen?
ExecuteHtml will create a html-page with the content. There are no anchors generated.
 
Upvote 0
Top