Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Presets")
kvPresetsList.Initialize(File.DirDefaultExternal, "kvPresetsList", 1)
' Add an ULV to the activity.
'----------------------------
ULV.Initialize(0, 0, "", "ULV")
' Set ULV properties.
'--------------------
ULV.Color = Colors.White
ULV.SetStyle(ULV.STYLE_HOLO_LIGHT)
' Put the ULV view onto the current Activity.
'--------------------------------------------
Activity.AddView(ULV, 0, 0, 100%x, Activity.Height - 100dip)
' Change the pressed drawable of the ULV
' (the background of the clicked item will be green)
'---------------------------------------------------
Dim cd As ColorDrawable
cd.Initialize(Colors.Green, 16dip)
ULV.PressedDrawable = cd
ULV.SetPadding(5dip, 5dip, 5dip, 5dip)
' Create a layout to display ULV.
'--------------------------------
ULV.AddLayout("Presets", "Item_LayoutCreator", "Item_ContentFiller", UlvItemHeight, True)
' ULV.AddRowLayout("Presets", "Item_RowLayoutCreator", "Item_RowContentFiller", _
' UlvItemHeight, Widths.Length, Widths, DividerWidth, Colors.Gray, True)
' Build the items list for the ULV.
'----------------------------------
ULV.BulkAddItems(Main.intTotalPresetsSaved, "Presets", 0)
ULV.SelectionMode = ULV.SELECTION_SINGLE
End Sub