I have an interface consisting of a Save button and a Custom List. The list contains a variable number of items. Each item contains the same controls (loaded from a layout): few B4XPlusMinus, one B4XSwitch and an EditText.
When I click on the Save button, want to read all the values from all the items in the list and save them in a database. I was thinking about setting the Tag property identical to the value of the object when opening the interface. This way I can check if the value of the object is different at the time of saving and send to the server only those that have changed.
I ran into a problem: I do not know how to determine when I click the Save button the objects that interest me. The solution found (clearing all the Views in the panel and reading only those that matter) uses precisely the Tag property to identify the object ...
Another idea would be to save in the Tag property of a Map type structure that contains both the object identifier and the initial value. This approach seems to slow down the application even more...
What do you recommend?
When I click on the Save button, want to read all the values from all the items in the list and save them in a database. I was thinking about setting the Tag property identical to the value of the object when opening the interface. This way I can check if the value of the object is different at the time of saving and send to the server only those that have changed.
I ran into a problem: I do not know how to determine when I click the Save button the objects that interest me. The solution found (clearing all the Views in the panel and reading only those that matter) uses precisely the Tag property to identify the object ...
Another idea would be to save in the Tag property of a Map type structure that contains both the object identifier and the initial value. This approach seems to slow down the application even more...
What do you recommend?