Hello
This is a code from beginners guide:
I made two buttons b1 and b2 in designer.
It doesn't work. Why ?
When buttons are initialized in code NOT in designer all works fine.
This is a code from beginners guide:
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim Buttons() As Button
Dim b1 As Button
Dim b2 As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout ("1.bal")
Buttons = Array As Button(b1, b2)
End Sub
Sub Buttons_Click
Dim btn As Button
btn = Sender
Activity.Title = "Button " & btn.Tag & " clicked"
End Sub
I made two buttons b1 and b2 in designer.
It doesn't work. Why ?
When buttons are initialized in code NOT in designer all works fine.
Last edited: