This may be a simple matter for you but I have been trying and I can not do the following:
I created a ScrollView in which also created buttons dynamically. So far all is well.
However when I create a function to the button, eg
sub r1_Click
r1.text = "X"
'or
msxbox ("xxxx", "ok")
end Sub
When I click the button ScrollView no effect.
If it is a button created in the designer gives the message correctly.
If you have crated the button manually you must add the EVENT name:
B4X:
Dim r1 As Button
...
r1.Initialize("") '<--No event name, therefore the click won't trigger
r1.Initialize("r1") '<-- This will do what you need
...
Sub r1_Click
MsgBox ("xxxx", "ok")
End Sub