everyone. I would like to show only the top two corners of a CardView rounded. I'm trying to do that with a separate layout file. Nothing happens at all. The corners are not rounded.
acitivity_single_xml layout
<androidx.cardview.widget.CardView
android:id="@+id/cardView2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="40dp"
android:background="@drawable/card_radius"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3">
...
</androidx.cardview.widget.CardView>
card_radius.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<corners android:topRightRadius="40dp"
android:topLeftRadius="40dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp"></corners>
<solid android:color="@color/white_real"></solid>
</shape>
</item>