When I'm giving CardView to app:CardBackgroudColor="@color/black" it's work
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_gravity="center"
android:layout_margin="2dp"
app:cardCornerRadius="20dp"/>
<androidx.cardview.widget.CardView
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center"
app:cardBackgroundColor="@color/black"
app:cardCornerRadius="19dp"/>
</FrameLayout>
But, When I'm giving CardView to app:CardBackgroudColor="@color/black" and app:cardElevation="0dp" card background color remove from the card.
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.cardview.widget.CardView
android:layout_width="42dp"
android:layout_height="42dp"
android:layout_gravity="center"
android:layout_margin="2dp"
app:cardCornerRadius="20dp"/>
<androidx.cardview.widget.CardView
android:layout_width="38dp"
android:layout_height="38dp"
android:layout_gravity="center"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/black"
app:cardCornerRadius="19dp"/>
</FrameLayout>