Sub CreateListFavoriLayout
ListFavori = xui.CreatePanel("")
ListFavori.SetLayoutAnimated(0, 0, 0, 300dip, 300dip)
ListFavori.LoadLayout("ListTemplate") 'ListTemplate is part of XUI Views library.
CustomListView1.sv.SetColorAndBorder(xui.Color_Transparent, 0, 0, 0)
CustomListView1.Clear
resultat=SQL2.ExecQuery("SELECT nomcommune,inseecommune FROM favori ORDER BY nomcommune ASC")
resultat.Position = 0
For i = 0 To resultat.RowCount - 1
resultat.Position = i
CustomListView1.AddTextItem(resultat.GetString("nomcommune"),resultat.GetString("inseecommune"))
Next
End Sub