I am trying to write a list containing custom views to a file.
File.WriteList("./", "Test.txt", lst_xRotateKnobs)
lst_xRotateKnobs = File.ReadList("./", "Test.txt")
does not give the correct results.
What is the best way to save my list containing customview (class module)?
What do you mean? What does lst_xRotateKnobs contain? I guess xRotaryKnob views. If so, I don't think you can do that.
You can save data about the views, their state. You could create a custom type (declared in B4XMainPage or Main Activity) and use serialization to save the variable of this type, even a List of containing variables of this type.
What do you mean? What does lst_xRotateKnobs contain? I guess xRotaryKnob views. If so, I don't think you can do that.
You can save data about the views, their state. You could create a custom type (declared in B4XMainPage or Main Activity) and use serialization to save the variable of this type, even a List of containing variables of this type.
All you can do is to save the data you need to create a new instance of the Object and create a new instance setting all values that you have set before.
See LucaMS Answers about a customtype you can use to realize it.