You can use .AddTwoLines2 to specify a return value for the list click event ..
B4X:
Dim label1,label2,l As String
label1 = "abc"
label2 = "def"
'using .AddTwoLines2.. allows return value to be specified for click events...
ListView1.AddTwoLines2(label1,label2,label2) '...Last parameter is return value
Both is simply possible. You can store with easy Listview-Item a "ReturnValue". Use this Returnvalue using a map.
Here is a short example which uses this Feature.
B4X:
For i = 0 To 9
Dim retmap As Map
retmap.Initialize
retmap.Put("tag","TagValue"&i)
retmap.Put("itemID","ItemID"&i)
retmap.Put("name","ItemName"&i)
retmap.Put("line1","This is line 1")
retmap.Put("line2","This is line 2")
lv.AddTwoLines2(retmap.Get("line1"), retmap.Get("line2"), retmap)
Next
"retmap" in this case could be a complete Databaseentry with all Informations about an article for example...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.