Android Question Problem with sql and listview

RobRock92

Member
Licensed User
Longtime User
hi , I am creating an application that creates tax documents such as invoices and wanted to know how do you in a listview filled with description and price, take only that part of the price and put it into a textbox...
Thanks and excuse me for bad English, I'm Italian :)
 

Mahares

Expert
Licensed User
Longtime User
Here is a small example:
B4X:
'Code in the ListView item click
Dim strVar As String=Value         'Example: Italian Sausage $6.55
et.Text = strVar.substring(strVar.indexof("$"))     'returns $6.55
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Use the substring function. See example below:
B4X:
Dim MyString As String="$6.55"
MyString=MyString.SubString(MyString.indexof("$")+1)    'displays 6.55
Msgbox(MyString,"")
 
Upvote 0
Top