i am using the following code to read in a file and show it on a listview.
As some lines are empty i want to skip them when reading in OR displaying the items in the listview.
Anyone a hint ?
TextReader:
Dim TextRd As TextReader
TextRd.Initialize(File.OpenInput(File.DirAssets, "Bestandsliste.txt"))
ListViewBestand.Clear
ListViewBestand.SingleLineLayout.Label.TextSize=14
ListViewBestand.SingleLineLayout.Label.Height=20dip
ListViewBestand.SingleLineLayout.ItemHeight=70
ListViewBestand.SingleLineLayout.Label.TextColor = xui.Color_Black
Dim line As String
line = TextRd.ReadLine
' ListViewBestand.s = 120dip
ListViewBestand.AddSingleLine(line.trim)
Do While line <> Null
line = TextRd.ReadLine
ListViewBestand.AddSingleLine(line)
Log(line)
Loop
TextRd .Close
ListViewBestand.Invalidate
As some lines are empty i want to skip them when reading in OR displaying the items in the listview.
Anyone a hint ?