How to change the divider color in the listview?

后端 未结 6 693
庸人自扰
庸人自扰 2020-12-14 06:06

I need to change the divider color in the listview. The code I am using to accomplish this is quoted below:



        
6条回答
  •  失恋的感觉
    2020-12-14 06:20

    I have tried it out with:

     
     
    

    and color value is inside colors.xml:

    #C60202
    

    And its working fine and displaying Divider color as red with 1dip height.

    Update:

    Just check your listview layout, you have mentioned 1px for layout_width and layout_height and you are setting 4px for the dividerHeight.

提交回复
热议问题