Hello, I have a CustomListView and each line I have in the list has a checkbox that corrisponds to a setting. I use Statemanager to check if it’s true or false , then check/uncheck the box and move on to the next.
So instead of doing something like:
Can the whole thing be done in a loop instead? Something like:
So instead of doing something like:
B4X:
If Statemanger.Getsetting(“key1”) = True Then
Checkbox1.checked = True
Else
Checkbox1.checked = False
End if
If Statemanger.Getsetting(“key2”) = True Then
Checkbox2.checked = True
Else
Checkbox2.checked = False
End if
If Statemanger.Getsetting(“key3”) = True Then
Checkbox3.checked = True
Else
Checkbox3.checked = False
End if
Can the whole thing be done in a loop instead? Something like:
B4X:
For Each chk as Checkbox in CustomListView