Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
'Dim rndlist As RoundListView
Dim rndlist As ListView
Dim cd As ColorDrawable
Dim label1, label2 As Label
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
rndlist.Initialize("RoundListView")
Activity.AddView(rndlist, 5%x, 3%y, 90%x, 95%y)
cd.Initialize(Colors.ARGB(200, 139,136,120), 20dip)
rndlist.Background = cd
label1 = rndlist.TwoLinesLayout.Label
label2 = rndlist.TwoLinesLayout.SecondLabel
label1.TextColor = Colors.Red
label2.TextColor = Colors.Black
label1.Gravity = Gravity.CENTER_HORIZONTAL
label2.Gravity = Gravity.CENTER_HORIZONTAL
rndlist.ScrollingBackgroundColor = Colors.Transparent
For ii = 0 To 10
rndlist.AddTwoLines2("Round Corners", "Example for Round corners", Null)
Next
Dim r1 As Reflector
If r1.GetStaticField("android.os.Build$VERSION", "SDK_INT") >= 10 Then
r1.Target = rndlist
r1.RunMethod4("setOverscrollFooter", Array As Object(Null), _
Array As String("android.graphics.drawable.Drawable"))
End If
End Sub