How to remove default cardview border from the layout.xml
Try adding this to your cardView
card_view:cardPreventCornerOverlap="false"
card_view:cardPreventCornerOverlap="false"
or using java:
cardView.setPreventCornerOverlap(false)
You can read all about it here.