Android Question Adding a new line of code

Sanxion

Active Member
Licensed User
Longtime User
Hi all

What is the best method of adding a new line of code in this scenario:

Every instance of:

ivResult.Visible = True

I want to add:

ivSound.Visible = True

So the code would look like:

ivResult.Visible = True
ivSound.Visible = True

There are many instances of line (ivResult.Visible = True) which is why a manual procedure would take a very long time.

Thanks
 

Sanxion

Active Member
Licensed User
Longtime User
Never repeat the same code multiple times.

There are many ways to implement it. A simple solution is to create a sub and call it:
B4X:
Sub ivVisible(Visible As Boolean)
ivSound.Visible = Visible
ivResult.Visible = Visible
End Sub

Thank-you Erel.
 
Upvote 0
Top