B4J Question Problem with WebviewExtra1 and Listview Click Event

WebQuest

Active Member
Licensed User
Hi I'm trying to access the elements of a listview that shows products in a WebViewExtra. the itemClick event of the ListView in the WebViewExtra does not work what am I doing wrong?

CODE:
Sub ListProduct_initialize(id As String,img As String,nome As String, qty As String, prezzo As String, desc As String)
    
        Dim p As AnchorPane
        p.Initialize("")
        p.LoadLayout("Layout1")     
        
        Lid.Text=id       
        LNome.Text =nome
        LQty.Text =qty
        LPrezzo.Text= prezzo
        TextAreaListAngebote.Text = desc
        Picture.Initialize(File.DirAssets,"LoadImage.png")
        ImageViewListAngebote.SetImage(Picture)
        
        'Add the panel to the listview
        lw.Items.Add(p)
        
End Sub

'This does not work
Sub lw_ItemClick (Position  As Int, Value As Object)
    jxui.MsgboxAsync("click", "Info")
End Sub
 

WebQuest

Active Member
Licensed User
I apologize or solved this way.....?

B4X:
sub ButtonGetIndex_Click
'Select the item first and you get the index and so on ...
lw.SelectedIndex

End Sub
 
Upvote 0
Top