Android Question Saving listview objects to a file

jalle007

Active Member
Licensed User
Longtime User
I populate my listView with objects have type like this:

B4X:
Type Person (iD As Int, Name As String , PhoneNo As String , Photo As Bitmap, sendemail As Boolean, sendsms As Boolean, running As Boolean)
and then when I click on that lv item
B4X:
Sub lvAdded_ItemClick (Position As Int, Value As Object)

    Dim p As Person=Value

    ToastMessageShow(p.Name & p.PhoneNo,True) ' <- this works
    Next

End Sub


Question is : How do I sawe that listview objects to one file and retrieve it later?
 

jalle007

Active Member
Licensed User
Longtime User
and here is the actual problem i have. my object is split into three lines when saved to file. that is actually described in documentation that if object contain CrLf then it will be split into multiple lines
b4.png

What is the best practice then to have list of objects saved to file and retrieved later ?
 
Upvote 0
Top