1

I have a little problem with displaying cardCornerRadius in my CardView. Everything works fine on the emulator, but as soon as I test the app on my real device, I no longer see a corner radius around my CardView. What could be the reason ? API Level Emulator 28 (PIE)

   <LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:padding="10dp">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:elevation="20dp"
        app:cardCornerRadius="20dp"
        >
    
     ... 
  </LinearLayout>

Mobile View: enter image description here

Emulator View:

Captai-N
  • 1,124
  • 3
  • 15
  • 26

1 Answers1

0

try this if you are using android:hardwareAccelerated="false" in your manifest:

delete this line, because this line prevents card view from showing radius.

JustSightseeing
  • 1,460
  • 3
  • 17
  • 37