Ok, we assume you are using xCustomList view. This is a nice approach since you can layout one row something like this:
View attachment 87381
And as per say xCustomListView example, then your code to load up one row will look like:
Sub LoadOneRow(i As Int) As B4XView
Dim p As B4XView = xui.CreatePanel("")
p.SetLayoutAnimated(0 ,0,0,100%x, 180dip)
p.LoadLayout("OneRow")
Label1.Text = Label1.Text & " " & i
Label2.Text = "Hello xxxxxxxxxxxxxxxxxxx" & CRLF & "Next line of some annoucement text"
Dim myDt As Long = DateTime.Now
Label3.Text = DateUtils.GetDayOfWeekName(myDt) & ", " & DateUtils.GetMonthName(myDt) & " " & DateTime.GetDayOfMonth(myDt)
p.Tag = i
Return p
End Sub
So, in above, (use the DateUtils library - the above line for label3.text = shows the format I used.
So, the result should look something like this:
View attachment 87382
So the line for date assumes that myDt has a date. In the above, I just passing "i" in a for next loop, but in your case you would be grabbing data from the database.
So my small loop that feeds the "one row load" routine is this:
Sub LoadMyRows
Dim i As Int
For i = 1 To 10
Dim obj As Object
CustomListView1.Add(LoadOneRow(i), obj)
Next
End Sub
(in your case, you could/would pass the row of data.
Regards,
Albert D. Kallal
Edmonton, Alberta Canada