As a developer you should avoid duplicating code. I sometimes see code such as:
If you like to write such code then unfortunately this quiz is not for you...
In this quiz you need to add 2000 buttons to the main activity. Each button should show a random number between 1 to 100.
When the user clicks on a button, all buttons with the same number should be brought to front:
A good answer is an answer that correctly implements this quiz.
An excellent answer is an answer that correctly implements this quiz and doesn't iterate over all buttons each time (finding the set of buttons in O(1)).
B4X:
Sub Button1_Click
x = 1
End Sub
Sub Button2_Click
x = 2
End Sub
...
In this quiz you need to add 2000 buttons to the main activity. Each button should show a random number between 1 to 100.
When the user clicks on a button, all buttons with the same number should be brought to front:
A good answer is an answer that correctly implements this quiz.
An excellent answer is an answer that correctly implements this quiz and doesn't iterate over all buttons each time (finding the set of buttons in O(1)).