When i run my code on api 28 i do not see this white border along the inner edges of the cardview. but on api 19 i get the following rendered:
My desire is for the color to entirely fill the cardview, and it should clip the corners so i keep the desired rounded effect. here is the simple demo code showing its not working:
<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="300dp"
android:layout_height="170dp"
android:theme="@style/Theme.MaterialComponents.Light"
app:cardBackgroundColor="@android:color/white"
app:cardCornerRadius="8dp"
app:cardElevation="4dp"
app:rippleColor="@android:color/transparent"
app:strokeWidth="0dp">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/holo_blue_dark" />
</com.google.android.material.card.MaterialCardView>
note: take a look at what it looks like when rendered on api 28, its exactly what i desire:
UPDATE: I ADJUSTED
using app:cardPreventCornerOverlap="false" , but makes it not rounded. when i put a border around it its not contained in the border now.
can someone suggest :