How to add colored border on cardview?

前端 未结 7 1704
遥遥无期
遥遥无期 2020-12-13 05:56

I am new to Android and this is my first question here.

I am trying to add a colored vertical border at the beginning of the cardview. How can I achieve it on xml ?

7条回答
  •  误落风尘
    2020-12-13 06:31

    my solution:

    create a file card_view_border.xml

    
    
    
    
    
    
    

    and set programmatically

    cardView.setBackgroundResource(R.drawable.card_view_border);
    

提交回复
热议问题