Hi all,
I got a problem with lists in B4A.
I have to add items to a list,
The list must be populated with a custom class, the class variables get populated by an API CALL that answer with a XML
To parse the xml i'm using XmlSax and inside this event:
Sub parser1_EndElement (Uri As String, Name As String, Text As StringBuilder)
select case Name
case "test"
myclass.name = Text
end sub
The class that must be populated is placed in the Globals Variables declarations
So in the process I populate the class that will be added to the list using the Parser.
Everytime it make a new call the class must be reset so i put in the code
myClass.Initialize
The problem is, everytime i make a new API CALL it gets the new response with different values
but when i try to add the class to the list, it adds everytime the class but with the same values of the previous item so i get only clones of the first item in the list.
How can i solve it?