I have the following layout.
<androidx.cardview.widget.CardView
android:layout_width="160dp"
android:layout_height="160dp"
app:cardBackgroundColor="#AACC0000"
app:cardCornerRadius="30dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="Some text" />
</androidx.cardview.widget.CardView>
If I set semi-transparent color (#AACC0000)
to cardBackgroundColor
, strange rectangle shape appears in the middle of cardView.
If I set color without alpha channel (#CC0000)
, that rectangle shape dissapears. Regards