Hi,
I want to load data from a text file (test.txt) to a listviews..
Text file data will be for e.g.
12343
2345
23678
897345
34536
Each data in text file should be as loaded as different items in listview.
i tried the above code but giving me null pointer error. anyone please help me..
Thanks
I want to load data from a text file (test.txt) to a listviews..
Text file data will be for e.g.
12343
2345
23678
897345
34536
Each data in text file should be as loaded as different items in listview.
B4X:
Sub ReadTextReader
Dim TextRd As TextReader
TextRd .Initialize(File.OpenInput(File.DirRootExternal, "test.txt"))
Dim line As String
line = TextRd .ReadLine
Do While line <> Null
line = TextRd .ReadLine
Loop
ListView1.AddSingleLine(line)
TextRd .Close
End Sub
i tried the above code but giving me null pointer error. anyone please help me..
Thanks