In my app the user selects a contact from a listview and then a phone number from the selected contact's list of phone numbers and phone types (using ContactUtils). However the selection produces both the phone number and the type. How do I get just the phone number from the user's selection?
Here's the relevant code. (The last item in the code below "Value" has both the phone# and phonetype and I just want the phone# but need to show the phone type in the list for the user to make his selection).
Here's the relevant code. (The last item in the code below "Value" has both the phone# and phonetype and I just want the phone# but need to show the phone type in the list for the user to make his selection).
B4X:
Sub listContacts_ItemClick (Position As Int, Value As Object)
Dim c As cuContact = Value
listPhonenums.Clear
For Each phone As cuPhone In cu.GetPhones(c.Id)
listPhonenums.AddSingleLine(phone.Number & " , " & phone.PhoneType)
Next
End Sub
Sub listPhonenums_ItemClick (Position As Int, Value As Object)
lblPhonenum.Text=""
lblPhonenum.text=Value
End Sub