I have a database and i fill a listview with it
please, how I can assign a specific space for each item i add to a listview line? so that all items are under each other without being displaced along the length of the above?
now thats happens:
and i want something like this.
Thank you very much.
Ahh,this is the listview init
B4X:
Sub ListViewFill
ListView1.Clear
cur = SQL1.ExecQuery(sqltxt)
Dim ar As String
For i = 0 To cur.RowCount - 1
cur.Position = i
If cur.GetString("Color1").Contains(" ") Then
ar=cur.GetString("Color1").Replace(" ","")
End If
ListView1.AddSingleLine(ar&" "&cur.GetString("Color2")&" "&cur.GetString("Color3")&" "&cur.GetString("Descripcion")&" "&cur.GetString("Data")&" "&cur.GetString("Fil3")&" "&cur.GetString("Descr2")&" "&"AC,BG?")
Next
End Sub
now thats happens:
B4X:
a linea1 averquepasa
aa linea1 mal
1 dos tres
B4X:
a linea1 averquepasa
aa linea1 mal
1 dos tres
Ahh,this is the listview init
B4X:
Sub ListViewInit
ListView1.SingleLineLayout.ItemHeight = 40dip
ListView1.SingleLineLayout.Label.Left = 0
ListView1.SingleLineLayout.Label.Width = 100%x
ListView1.SingleLineLayout.Label.Height = 40dip
ListView1.SingleLineLayout.Label.Gravity = Gravity.CENTER_VERTICAL
ListView1.SingleLineLayout.Label.Color = Colors.White
ListView1.SingleLineLayout.Label.TextSize = 15
ListView1.SingleLineLayout.Label.TextColor = Colors.Black
ListView1.FastScrollEnabled = True
End Sub