Android Question Read Data from custom Scrollview

Discussion in 'Android Questions' started by Steini1980, Jul 22, 2015.

  1. Steini1980

    Steini1980 Member Licensed User

    I have created a Scrollview like "sv.png" or example code:
    Code:
    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,
    10dip5dip250dip40dip)
        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?
     

    Attached Files:

    • sv.png
      sv.png
      File size:
      91.7 KB
      Views:
      16
  2. Erel

    Erel Administrator Staff Member Licensed User

    I recommend you to switch to CustomListView. It is a similar solution and it includes helper methods that will help you to get the data from the list.
     
Loading...