I am using ListView.
Once the user opens the app and starts a list it shows on the screen.
But if they close and reopen the app all input is gone.
I must be missing something....
I believe my missing link is the input is not getting into the test document or not staying when closed, but it shows on the screen
Thanks as Always
Once the user opens the app and starts a list it shows on the screen.
But if they close and reopen the app all input is gone.
B4X:
Sub Activity_Create(FirstTime AsBoolean)
Activity.LoadLayout("layout1")
ListView1.Initialize("ListView1")
If File.Exists(File.DirRootExternal,"test.txt") Then
List1 = File.ReadList(File.DirRootExternal, "test.txt")
Else
ListView1.AddSingleLine("Item #"& EditText1.Text)
List1.Sort(True)
File.WriteList(File.DirRootExternal, "test.txt", List1)
End If
Activity.AddView(ListView1, 0, 0, 100%x, 60%y)
End Sub
Sub ListView1_ItemClick (Position AsInt, Value AsObject)
Activity.Title = Value
List1.Initialize
ListView1.AddSingleLine("Item #"& EditText1.Text)
File.WriteList(File.DirRootExternal, "test.txt",List1)
I must be missing something....
I believe my missing link is the input is not getting into the test document or not staying when closed, but it shows on the screen
Thanks as Always