Saving data when selecting option

0

I have an Activity that has a list. In this list, the fields are almost all RadioButton . Currently, when the user saves the selected data in this list, all RadioButton is read to know which is checked. If so, take the answer, if you do not read anyway.

This procedure I have found slow, and chances are that the amount of fields increase, because this Activity is dynamic, and can decrease or increase the amount of field.

I thought of something that is my doubt: Would it be correct or have some problem in, when the user select the field I already save in the bank what he chose? What if he needs to change, go to the bank again and change that record?

That is, as long as the guy is checking, the data will already be registered in the bank.

Thanks!

    
asked by anonymous 01.06.2016 / 14:57

1 answer

0

Theoretically, this could be a viable option, but think of it this way:

What if the user clicks the wrong RadioButton?
It will always store in the database the option that was clicked, being the one that the user wanted or not. The downside is that you will be constantly entering information into your database.

Possible Solution:
When the user selects a RadioButton, he will be confronted with a message asking if it is even that RadioButton that he wants to select or if he wants to make any changes. This way you avoid being constantly entering information into your database and having to delete it.

    
01.06.2016 / 16:41