hi
i am trying to read a textfile that has 6 lines
first i tried to read each line to the object but i could not do it so i try now to add all lines to alistview and then read everything from this listview
what am i doing wrong
thanx
i am trying to read a textfile that has 6 lines
first i tried to read each line to the object but i could not do it so i try now to add all lines to alistview and then read everything from this listview
B4X:
listread.Initialize("listread")
listread.Clear
Dim Reader As TextReader
Reader.Initialize(File.OpenInput(File.DirDefaultExternal, "1.txt"))
Dim line As String
line = Reader.ReadLine
Do While line <> Null
Log(line) 'write the line to LogCat
listread.AddSingleLine(line)
line = Reader.ReadLine
Loop
Reader.Close
what am i doing wrong
thanx