Android Question How to change listview segmentation line color

a552191386

New Member
How to change listview segmentation line color
qq%E6%88%AA%E5%9B%BE20130922151405-png.19555
 

Attachments

  • QQ截图20130922151405.png
    QQ截图20130922151405.png
    1 KB · Views: 557

Ohanian

Active Member
Licensed User
Longtime User
Hello,

use this function :

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

a552191386

New Member
thanks very much
Hello,

use this function :

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