Hola
Estoy creando una consulta en json que funciona, pero, me gustaría realizar que por cada registro que se realiza, el panel se le de un index o que el label se le de un index. Tipo facebook
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Saludos, soy nuevo en b4a.
			
			Estoy creando una consulta en json que funciona, pero, me gustaría realizar que por cada registro que se realiza, el panel se le de un index o que el label se le de un index. Tipo facebook
			
				B4X:
			
		
		
		Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
End Sub
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim container As Panel
  
    Dim panel As Panel
  
    Dim col2 As Int = Colors.RGB(231,227,231)
    Dim lblAngle As Int = 5
    Dim border As ColorDrawable
  
    Dim txtpedido As Label
  
    Dim h As HttpJob
    Dim json As JSONParser
  
    Dim pedido As Label
    Dim pedidoxd As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
    container.Initialize("container")
    Activity.AddView(container,0,0,100%x,100%y)      
    container.Color = Colors.RGB(0,48,107)
    border.Initialize(col2, lblAngle)
  
    ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''INI SERVICIOS
                                                                                        pedido.Initialize("pedido")
                                                                                        txtpedido.Initialize("txtpedido")
  
  
    panel.Initialize("panel")
    Activity.AddView(panel, 0, 10%y, 100%x, 100%y)
    panel.Color = Colors.RGB (231,227,231)
    panel.Background = border
  
    panel.AddView(pedido, 0, 1%y, 20%x, 7%y)
    pedido.TextSize = 14
    pedido.TextColor = Colors.RGB (0,0,0)
    h.initialize("json", Me)
    h.Download2("direccion http"))
  
End Sub
Sub Activity_Resume
  
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub JobDone(job As HttpJob)
    If job.Success Then
        json.Initialize(job.GetString)
        CargarDatos
    Else
        Msgbox(job.ErrorMessage, "Error")
    End If
End Sub
Sub CargarDatos
    Dim m As Map
    m=json.NextObject  
    Dim data As List
  
    data=m.Get("data")
  
        For i=0 To data.Size-1
            m=data.Get(i)
          
            pedidoxd.Initialize("pedidoxd")
            Dim row As Int
          
            row = i * 40
          
            panel.AddView(pedidoxd, 0, 1%y + row, 100%x, 80%y)
            pedidoxd.Text = (m.Get("tmp_nom_pac"))
          
        Next
End SubSaludos, soy nuevo en b4a.
 
				 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		 
 
		