Android Tutorial Listview Divider Line Color

You can do it with the Reflection library:
Code: Copy
SetDivider(ListView1, Colors.Blue, 1dip)

Sub SetDivider(lv As ListView, Color As Int, Height As Int)
   Dim r As Reflector
   r.Target = lv
   Dim CD As ColorDrawable
   CD.Initialize(Color, 0)
   r.RunMethod4("setDivider", Array As Object(CD), Array As String("android.graphics.drawable.Drawable"))
   r.RunMethod2("setDividerHeight", Height, "java.lang.int")
End Sub
 
Bravo!

In analogy to "setDivider" is there something like "setBackgroundColorOnSelect"?
It is persistantly cyan on my phone.
 
can a method like that be used to change the typeface on a listview? also I cannot change color?
 
There is a much simpler means:

Code: Copy
Dim MyFont As Typeface
MyFont = Typeface.LoadFromAssets("dummy.ttf")
ListView1.TwoLinesAndBitmap.Label.Typeface = MyFont
ListView1.TwoLinesAndBitmap.Label.TextColor = Colors.Red
 
Back
Top