how to set colored border on cardview

后端 未结 6 1427
春和景丽
春和景丽 2020-12-05 05:16

I am implementing card view but I can\'t find any border option to set a border on it.

here is my card.xml:



        
6条回答
  •  有刺的猬
    2020-12-05 05:21

    Started from v28 design support library we can use Material Card View, which provides us with a material styled cardview implementation out of the box.

    
        ... child views ...
    
    

    You can further style the cardview by using two of the attributes that come with it:

    • app:strokeColor - The colour to be used for the given stroke, this must be set in order to display a stroke
    • app:strokeWidth - The width to be applied to the stroke of the view

提交回复
热议问题