I am new to B4A so please bear with me. I have a customlistview which has items in it. I am trying to make it so that if a user clicks on an item, it will be able to retrieve all details about that item (The text and value). I have got the value, but I've got no idea about how to find the text. Please see my code below
B4X:
Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Dim search As String
search = CustomListView1.GetValue
End Sub
I am just trying to find a way to access the text value that is associated with the list items. The actual text that displays to the user. Please let me know if I need to provide more info
Sub CustomListView1_ItemClick(Index As Int, Value As Object)
Dim pnl As B4XView = CustomListView1.GetPanel(Index)
dim myText as String = pnl.GetView(0).Text 'view(0) = 1st label on panel.. refer order in Designer ViewTree for Item/Row layout
This can vary depending on your CLV layout etc (are your row items views contained within a panel ?).. but should give you the idea.