I have this code:
There is some way to click on the list (CustomListView) the panel (p) in the position (Value) can copy everything it contains and assign everything to the panel (panel1)
The images and tags and their contents (everything) from panel (i) from customlistview to Panel2. Thanks.
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
actividad
End Sub
Sub actividad
For i = 1 To 20
Dim p As Panel
Bitmap1.Initialize(File.DirAssets,"Icon.png")
Bitmap2.Initialize(File.DirAssets,"fverde.png")
Bitmap3.Initialize(File.DirAssets,"froja.png")
Bitmap4.Initialize(File.DirAssets,"iconoleche.png")
Bitmap5.Initialize(File.DirAssets,"iconoazucar2.png")
Bitmap6.Initialize(File.DirAssets,"iconoin.png")
p.Initialize("")
p.Color = Colors.White
'IMAGEN DEL PRODUCTO //////////////////////////////////////
imagen.Initialize("")
p.AddView(imagen,5dip,5dip,65dip,65dip)
imagen.Bitmap=Bitmap1
'FLECHAS//////////////////////////////////////////////////////
'VERDE
imagen2.Initialize("")
p.AddView(imagen2, 180dip, 55dip, 240dip,50)
imagen2.Bitmap=Bitmap2
'ROJA
imagen3.Initialize("")
p.AddView(imagen3, 180dip, 70dip, 240dip,50)
imagen3.Bitmap=Bitmap3
'iCONOS LEYENDA////////////////////////////////////////////////
imagen4.Initialize("")
p.AddView(imagen4,80dip, 35dip, 240dip, 60)
imagen4.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
imagen4.Bitmap=Bitmap4
imagen5.Initialize("")
p.AddView(imagen5, 100dip, 35dip, 240dip, 60)
imagen5.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
imagen5.Bitmap=Bitmap5
imagen6.Initialize("")
p.AddView(imagen6,120dip, 35dip, 240dip, 60)
imagen6.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
imagen6.Bitmap=Bitmap6
'LOTE/////////////////////////////////////////////////////////
Dim lbl6 As Label
lbl6.Initialize("")
p.AddView(lbl6, 25dip,45dip,65dip,65dip)
lbl6.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl6.Tag="Label3"
lbl6.Text = "07/17"
lbl6.TextSize = 11
lbl6.TextColor = Colors.Black
'TITULO/////////////////////////////////////////////////////////
Dim lbl2 As Label
lbl2.Initialize("")
p.AddView(lbl2, 80dip, 5dip, 240dip, 30)
lbl2.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl2.Tag="Label2"
lbl2.Text = "Chicha Kiana"
lbl2.TextSize = 14
lbl2.TextColor = Colors.Black
'GRAMAJE/////////////////////////////////////////////////////////
Dim lbl3 As Label
lbl3.Initialize("")
p.AddView(lbl3, 80dip, 25dip, 240dip, 30)
lbl3.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl3.Tag="Label3"
lbl3.Text = "500"&"Gr"
lbl3.TextSize = 13
lbl3.TextColor = 0xFF424242
If (i Mod 2)=0 Then
'PRECIO//////////////////////////////////////////////////////////
Dim lbl4 As Label
lbl4.Initialize("")
p.AddView(lbl4, 80dip, 65dip, 240dip,30)
lbl4.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl4.Tag="Label4"
lbl4.Text = "10.000"&"BS"
lbl4.TextSize = 13
lbl4.Typeface = Typeface.DEFAULT_BOLD
lbl4.TextColor = Colors.Black
Else
Dim lbl4 As Label
lbl4.Initialize("")
p.AddView(lbl4, 80dip, 65dip, 240dip,30)
lbl4.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl4.Tag="Label4"
lbl4.Text = "5.000"&"BS"
lbl4.TextSize = 13
lbl4.Typeface = Typeface.DEFAULT_BOLD
lbl4.TextColor = Colors.Black
End If
'DIFERENCIA DE PRECIO////////////////////////////////////////////
Dim lbl5 As Label
lbl5.Initialize("")
p.AddView(lbl5, 255dip, 66dip, 240dip,30)
lbl5.Gravity = Bit.Or(Gravity.CENTER_VERTICAL, Gravity.LEFT)
lbl5.Tag="Label4"
lbl5.Text = "1500"
lbl5.TextSize = 13
lbl5.TextColor = Colors.Black
clv1.Add(p,150,i)
Next
End Sub
There is some way to click on the list (CustomListView) the panel (p) in the position (Value) can copy everything it contains and assign everything to the panel (panel1)
The images and tags and their contents (everything) from panel (i) from customlistview to Panel2. Thanks.