Hello All,
I am new in B4A and started working and exploring B4A.
I have been working with ULV with simple list view. But it is not working. Nothing showing in the list.
Below is my code...
Could anyone suggest why this is not showing the fruits name in the list?
I am new in B4A and started working and exploring B4A.
I have been working with ULV with simple list view. But it is not working. Nothing showing in the list.
Below is my code...
B4X:
Sub Globals
Dim ulv As UltimateListView
Dim itemheight As Int = 60dip
Dim fruits As List
End Sub
Sub Activity_Create(FirstTime As Boolean)
fruits.Initialize2(Array As String("Apple", "Banana", "Cherry", "Coconut", "Grapes", "Lemon", "Mango", "Melon", "Orange", "Pear", "Pineapple", "Strawberry"))
ulv.Initialize(0,0,"","ulv")
ulv.Color=Colors.White
Activity.AddView(ulv,0,0,100%x,100%y)
ulv.AddLayout("MyTest","layout_creator","layout_contentfiller",itemheight,True)
ulv.BulkAddItems(fruits.Size,"MyTest",0)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub layout_creator(LayoutName As String, LayoutPanel As Panel)
LayoutPanel.LoadLayout("fruitlabel")
End Sub
Sub layout_contentfiller(ItemID As Long, LayoutName As String, LayoutPanel As Panel, Position As Int)
Dim lbl As Label = LayoutPanel.GetView(0) 'First (and only) view in the panel
lbl.Text = fruits.Get(Position)
Could anyone suggest why this is not showing the fruits name in the list?