Hi there, i have a set of code creating 8 edittext fields in an activity. when a button is pressed i want it to read all the edittext entries, the problem is i've created the textboxes using code with a "for i = 1 to 8" line, which looks like this:
how do i make the button read all values inserted in the edittext fields?
B4X:
'generating labels and namefields
For i = 1 To 8
Dim labelplayer As Label
labelplayer.initialize("label" & i)
'changing albel properties
labelplayer.Text = "Player " & i
labelplayer.Textsize = 20
labelplayerYloc = 20%y*i
labelplayerXloc = 5%x
'generating second column when Y exceeds 100%
If labelplayerYloc >= 100%y Then
labelplayerYloc = labelplayerYloc - 80%y
labelplayerXloc = 45%x
End If
'adding label to view
Activity.AddView(labelplayer, labelplayerXloc, labelplayerYloc, 100dip, 40dip)
'generating namefields
Dim txtplayer As EditText
txtplayer.initialize("txt" & i)
txtplayerYloc = labelplayerYloc
txtplayerXloc = labelplayerXloc + 100dip
'adding txt to view
Activity.AddView(txtplayer, txtplayerXloc, txtplayerYloc, 100dip, 40dip)
Next
'create start button
Dim startbutton As Button
startbutton.Initialize("startbutton")
startbutton.Text = "start"
Activity.AddView(startbutton, 80%x, 0, 20%x, 100%y)
how do i make the button read all values inserted in the edittext fields?