Android Question Color separator item

micro

Well-Known Member
Licensed User
Longtime User
Hi to all
it's possible change color to a separator of an item in a listview?
When the backgroud color is too light the separator line is not visible.
Thanks
 

DonManfred

Expert
Licensed User
Longtime User
B4X:
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
 
Upvote 0
Top