#Region  Project Attributes
    #ApplicationLabel: ULV
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region
#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
End Sub
Sub Globals
    Dim ulv As UltimateListView
    Dim itemheight As Int = 60dip
    Dim fruits As List
    Dim lblname As Label
    Dim panel As Panel
    Dim btn As Button
End Sub
Sub Activity_Create(FirstTime As Boolean)
    'Activity.LoadLayout("main")
    panel.Initialize("")
    panel.Height = 100%y
    panel.Width = 100%x
    panel.Color = Colors.Black
    btn.Initialize("")
    btn.Height = 50dip
    btn.Width = 100dip
    btn.Text = "BUTTON"
    btn.Color = Colors.Red
    
    panel.AddView(btn,  (100%x-btn.Width)/2, 100%y-btn.Height,100dip, 50dip)
    
    fruits.Initialize2(Array As String("Apple", "Banana", "Cherry", "Coconut", "Grapes", "Lemon", "Mango", "Melon", "Orange", "Pear", "Pineapple", "Strawberry", "Litchi", "Watermelon"))
    ulv.Initialize(0,0,"","ulv")
    ulv.Color=Colors.White
    ulv.AddLayout("MyTest","layout_creator","layout_contentfiller",itemheight,True)
    Activity.AddView(panel,0,0,100%x, 100%y)
    ulv.BulkAddItems(fruits.Size,"MyTest",0)
    
    panel.AddView(ulv,0,0,100%x, 80%y)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub layout_creator(LayoutName As String, LayoutPanel As Panel)
    lblname.Initialize("")
    lblname.TextColor=Colors.Gray
    LayoutPanel.AddView(lblname,20, 0 ,LayoutPanel.Width,LayoutPanel.Height)
    
End Sub
Sub layout_contentfiller(ItemID As Long, LayoutName As String, LayoutPanel As Panel, Position As Int)
    lblname.Text = fruits.Get(Position)
End Sub