I wanted a cardview with only bottom border. So i found a solution :
toolbar_background.xml :
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" >
<solid android:color="@color/colorPrimary" />
</shape>
</item>
<item android:top="-2dp" android:right="-2dp" android:left="-2dp">
<shape>
<solid android:color="@android:color/transparent" />
<stroke
android:width="1dp"
android:color="@color/titleBarBorder" />
</shape>
</item>
</layer-list>
and then i added this .xml to my cardview as a background using android:background="@drawable/toolbar_background"
but the color just wont show up and cardview will render with a white background. what am i doing wrong ?