Sub refreshList(ID As String)
Dim dbRows As ResultSet = database.getAll(ID)
Activity.RemoveAllViews
Activity.LoadLayout("list")
loading.Visible=True 'loading label on the page
Log("begin slowness")
For farmNum = 0 To dbRows.RowCount-1
dbRows.NextRow
Dim fi As viewValue
fi.lbl1 =dbRows.GetString("na")
fi.lbl2 =dbRows.GetString("bi")
fi.lbl3 ="..."
fi.lbl4 ="..."
clv1.Add(createItem(fi),dbRows.GetString("id"))
Next
loading.Visible=False
Log("due")
End Sub
private Sub createItem(t As viewValue) As B4XView
Dim p As B4XView=xui.createpanel("")
p.SetLayoutAnimated(0,0,0,100%x,140dip)
p.SetColorAndBorder(Colors.Transparent,Colors.Transparent,Colors.Transparent,Colors.Transparent)
p.LoadLayout("item")
lbl1.text=t.lbl1
lbl2.text=t.lbl2
lbl3.text=t.lbl3
lbl4.text=t.lbl4
Return p
End Sub