Android Question Color separator item

Discussion in 'Android Questions' started by micro, Jun 22, 2015.

  1. micro

    micro Well-Known Member Licensed 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
     
  2. DonManfred

    DonManfred Expert Licensed User

    Code:
    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
     
    asales and mangojack like this.
  3. micro

    micro Well-Known Member Licensed User

    Thanks
    Best regards.
     
Loading...