Adding listviews programmatically
Hi,
I have removed the listviews and am trying to initialise them in code. the main_activity_create code is below. There are to listviews (lstOptions and lstBuddies). Interestingly lstOptions initializes correctly, but I still get the same error when I try to initialise lstBuddies (the same java runtime exception). It seems to be declared properly in Globals and I even tried renaming it, but no luck so far:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("main")
lstoptions.initialize("lstOptions")
Activity.AddView(lstOptions, 0, 170, 320, 130)
lstoptions.Color = Colors.DarkGray
lstOptions.AddSingleLine("Add New")
lstOptions.AddSingleLine("Edit")
lstOptions.AddSingleLine("Delete")
lstOptions.AddSingleLine("Get handicap")
lstBuddies.Initialize("lstBuddies")
activity.AddView(lstBuddies, 0, 0, 320, 170)
lstBuddies.Color = Colors.Green
intstartnum = 0
intendnum = 10
intstartname = 10
list1.Initialize
readlistsmash
lstOptions.Visible = False
End Sub