enmaber
Member
Estimados compañeros. estoy intentando cagar los datos de una linea de un ListView sin acierto alguno, ruego vuestra ayuda
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim id_item As Int
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 s As SQL
Dim c As Cursor
Dim lv As ListView
Dim Panel1 As Panel
Dim btn_alta As Button
Private txt_nombre As EditText
Dim txt_apellidos As EditText
Private txt_fecha As EditText
Private txt_talla As EditText
Dim EditText1 As EditText
Dim txt_apno As EditText
Dim s As SQL
Dim c As Cursor
Dim lv As ListView
Dim di As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("modificar")
Dim ruta As String
If File.ExternalWritable Then
ruta = File.DirDefaultExternal
Else
ruta = File.DirInternal
End If
If File.Exists(ruta, "fila.db") = False Then
File.Copy(File.DirAssets, "fila.db", ruta, "fila.db")
End If
s.Initialize(ruta, "fila.db", True)
c=s.ExecQuery("SELECT apellidos, nombre FROM Fila ORDER BY apellidos ASC") ' funciona
lv.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount-1
c.Position=i
lv.Visible = True
lv.SingleLineLayout.Label.TextSize = 15
lv.AddSingleLine(c.GetString("apellidos") & ", " & c.GetString("nombre")) 'funciona
Next
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub lv_ItemClick (Position As Int, Value As Object)
id_item = Value
lv.Visible = False
Panel1.Visible=True
txt_nombre.Text = "nombre"
txt_apellidos.Text= "apellidos"
End Sub
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: False
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim id_item As Int
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 s As SQL
Dim c As Cursor
Dim lv As ListView
Dim Panel1 As Panel
Dim btn_alta As Button
Private txt_nombre As EditText
Dim txt_apellidos As EditText
Private txt_fecha As EditText
Private txt_talla As EditText
Dim EditText1 As EditText
Dim txt_apno As EditText
Dim s As SQL
Dim c As Cursor
Dim lv As ListView
Dim di As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("modificar")
Dim ruta As String
If File.ExternalWritable Then
ruta = File.DirDefaultExternal
Else
ruta = File.DirInternal
End If
If File.Exists(ruta, "fila.db") = False Then
File.Copy(File.DirAssets, "fila.db", ruta, "fila.db")
End If
s.Initialize(ruta, "fila.db", True)
c=s.ExecQuery("SELECT apellidos, nombre FROM Fila ORDER BY apellidos ASC") ' funciona
lv.Clear
If c.RowCount>0 Then
For i=0 To c.RowCount-1
c.Position=i
lv.Visible = True
lv.SingleLineLayout.Label.TextSize = 15
lv.AddSingleLine(c.GetString("apellidos") & ", " & c.GetString("nombre")) 'funciona
Next
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub lv_ItemClick (Position As Int, Value As Object)
id_item = Value
lv.Visible = False
Panel1.Visible=True
txt_nombre.Text = "nombre"
txt_apellidos.Text= "apellidos"
End Sub