Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Dim lst As List
lst.Initialize
lst.Add("Lorem ipsum dolor sit amet.")
lst.Add("CLorem ipsum dolor sit amet, consectetur adipiscing elit.")
lst.Add("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a cursus nisi, eget pretium leo.")
lst.Add("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a cursus nisi, eget pretium leo. Mauris eget rhoncus orci.")
lst.Add("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce a cursus nisi, eget pretium leo. Mauris eget rhoncus orci. Nullam sit amet vehicula urna. Integer non mauris dignissim, aliquet nulla sit amet.")
lst.Add("Lorem ipsum dolor sit amet.")
For i = 1 To 6
clv2.Add(CreateListItem(lst.Get(i), clv2.AsView.Width, 50dip), i)
Next
End Sub
Sub CreateListItem(Text As String, Width As Int, Height As Int) As Panel
Dim lb As Label
lb.Initialize("")
lb.Visible = False
lb.Text = Text
lb.TextSize = 20
Activity.AddView(lb, 0, 0, Width, 50dip)
intH = su.MeasureMultilineTextHeight(lb, lb.Text)
Log(intH)
Height = intH
Dim p As Panel
p.Initialize("")
p.SetLayout(0, 0, Width, Height)
p.LoadLayout("cellitem")
Label1.Text = Text
Return p
End Sub