Hello, what is the correct way to loop through values in a listview and/or spinner control?
Here is what I have so far but I get an error at the last value:
Thanks,
Lawboy
Here is what I have so far but I get an error at the last value:
B4X:
Sub WriteTextWriter
Dim TextWriter1 As TextWriter
Dim listcount As Int
Dim listvalue As String
TextWriter1.Initialize(File.OpenOutput(File.DirRootExternal, "listview.txt", False))
listcount = 0
listvalue = listview1.GetItem(listcount)
Do While listvalue <> Null
listvalue = listview1.GetItem(listcount)
TextWriter1.WriteLine(listvalue)
Msgbox(listvalue ,listcount)
listcount = listcount + 1
Loop
TextWriter1.Close
End Sub
Thanks,
Lawboy
Last edited: