Android Question Read Data from custom Scrollview

Steini1980

Active Member
Licensed User
Longtime User
I have created a Scrollview like "sv.png" or example code:
B4X:
  Dim cDlg As CustomDialog
  Dim PanelHeight As Int    : PanelHeight=50dip 
  Dim sv As ScrollView
  sv.Initialize(Activity.Height - 200)
  Main.dbMontageinfo = Main.SQLSrv.ExecQuery("SELECT * FROM tblMontageinfo")
  For i=0 To Main.dbMontageinfo.RowCount-1
    Main.dbMontageinfo.Position = i
      
    Dim pnl1 As Panel
    pnl1.Initialize("pnl1")
    pnl1.Tag=i       
    If (i Mod 2)=1 Then
        pnl1.Color=Colors.LightGray
    Else
        pnl1.Color=Colors.White
    End If
        
    Dim lbl1 As Label
    lbl1.Initialize("lbl1")
    pnl1.AddView(lbl1,10dip, 5dip, 250dip, 40dip)
    lbl1.Tag=i
    lbl1.TextSize=20
    lbl1.TextColor = Colors.Black
    lbl1.Text=Main.dbMontageinfo.GetString2(0)
       
        Dim cmb1 As Spinner
        Dim values As List = SplitStr(Main.dbMontageinfo.GetString2(1),",")
        cmb1.Initialize("cmb1")
        pnl1.AddView(cmb1,260dip,5dip,250dip,40dip)
        cmb1.Tag=i
        cmb1.Add("")
        If values.Size > 0 Then
          cmb1.AddAll(values)
        End If
       
        Dim edt1 As EditText
        edt1.Initialize("edt1")
        pnl1.AddView(edt1,520dip,5dip,180dip,40dip)
        edt1.Tag=i
        edt1.Color = Colors.DarkGray
       
               
      sv.Panel.AddView(pnl1,0,5dip+i*PanelHeight,96%x,PanelHeight)
     Next   
    cDlg.AddView(sv,3dip,0,96%x,100%y)
    cDlg.Show("Montageinfo","OK","CANCEL","",Null)

If the use has closed the Dialog with "OK" Button, I need to read all the settings made in Scrollview.
How can I get this information?
 

Attachments

  • sv.png
    sv.png
    91.7 KB · Views: 173
Top