Dim ListView1 As ListView
ListView1.Initialize("ListView1")
'For item
ListView1.Color=Colors.White
ListView1.TwoLinesLayout.Label.Color=Colors.White
ListView1.TwoLinesLayout.Label.TextColor=Colors.Black
ListView1.TwoLinesLayout.Label.Typeface=Typeface.DEFAULT_BOLD
ListView1.TwoLinesLayout.SecondLabel.Color=Colors.White
ListView1.TwoLinesLayout.SecondLabel.TextColor=Colors.Black
' For separator line
ListView1.SingleLineLayout.label.color=Colors.Blue
ListView1.SingleLineLayout.label.TextColor=Colors.Blue
ListView1.SingleLineLayout.ItemHeight=10dip
Activity.AddView(ListView1,0,0,200dip,100%y)
For i=0 To 10
If i=5 Then
'separator
ListView1.AddSingleLine2(i,"LineSeparator")
Else
' Item
ListView1.AddTwoLines2("Number " & i,"Info",I)
End If
Next
End Sub
Sub ListView1_ItemClick (Position As Int, Value As Object)
If Value="LineSeparator" Then
'ignore it
ToastMessageShow("Separator ",False)
Else
' Item Selected
ToastMessageShow("Item " & Value,False)
End If
End Sub