it's easy to create buttons by activity,but i can't find an example for b4x
USE ACTICITY,CREATE BUTTONS OR IV BY CODE
USE B4X,CREATE BUTTONS OR IV BY CODE,I need an example thanks.
USE ACTICITY,CREATE BUTTONS OR IV BY CODE
USE ACTIVITY:
ImageViews(i).Initialize("ImageView")
Activity.AddView(ImageViews(i),(i Mod AA)*10%x,Floor(i/AA)*(30%y+10%x), 10%x, 30%y)
USE B4X,CREATE BUTTONS OR IV BY CODE,I need an example thanks.
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
Log("MainPage Create")
Root = Root1
Root.LoadLayout("MainPage")
Page1.Initialize 'initializes Page1
B4XPages.AddPage("Page 1", Page1) 'adds Page1 to the B4XPages list
For l = 0 To 10
Dim Buttons(10) As B4XView
Private A1 As Int
A1=10
Root.Add(Buttons,Root.width*A1+10dip,10dip,10dip,100dip) ' it's easy to create buttons by activity,but i can't find an example for b4x
' Buttons(l).Initialize("Buttons")
' Buttons(l).Text =l
Log(Buttons)
Next
FillComboBox
End Sub