Bonjour à tous !

J'ai créé un cardView qui me sert de structure pour implémenter un recyclerView.
Tout fonctionne (ou presque), mon recyclerView s'implémente bien avec des cardView qui contiennent bien les éléments demandés ainsi que la couleur de fond demandée.

Cependant, 2 choses ne fonctionnent pas : le cardElevation et le cardCornerRadius.
Dans Android Studio, en mode design, ces rendus apparaissent bien. Mais lorsque je lance l'application dans l'AVD, les cardView redeviennent rectangulaires et sans élévation.

Quelqu'un aurait une idée de ce qui cloche ?

Code du cardView :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginStart="20dp"
    android:layout_marginTop="10dp"
    android:layout_marginEnd="20dp"
    android:layout_marginBottom="10dp"
    android:orientation="vertical">
 
 
    <androidx.cardview.widget.CardView
        android:id="@+id/tcard"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:focusable="true"
        app:cardBackgroundColor="#DD3232"
        app:cardCornerRadius="@dimen/radius"
        app:cardElevation="@dimen/elevation"
        app:cardUseCompatPadding="true"
        tools:ignore="MissingConstraints">
 
        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingStart="10dp"
            android:paddingEnd="10dp">
 
            <TextView
                android:id="@+id/tposte"
                android:layout_width="40dp"
                android:layout_height="wrap_content"
                android:layout_alignParentStart="true"
                android:layout_alignParentLeft="false"
                android:layout_centerVertical="true"
                android:gravity="center"
                android:text="M"
                android:textAlignment="center"
                android:textSize="36sp"
                android:textStyle="bold" />
 
            <TextView
                android:id="@+id/tdate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:layout_centerVertical="true"
                android:gravity="center"
                android:text="Mercredi 27 Janvier 2002"
                android:textSize="18sp" />
 
            <TextView
                android:id="@+id/tfonction"
                android:layout_width="40dp"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_centerVertical="true"
                android:layout_weight="1"
                android:gravity="center"
                android:text="O"
                android:textSize="30sp" />
        </RelativeLayout>
 
    </androidx.cardview.widget.CardView>
</LinearLayout>

Code du bluid.gradle :
Code gradle : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
apply plugin: 'com.android.application'
 
android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"
 
    defaultConfig {
        applicationId "com.xxx.test3"
        minSdkVersion 19
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
 
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
 
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
 
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
    implementation 'androidx.navigation:navigation-fragment:2.3.0'
    implementation 'androidx.navigation:navigation-ui:2.3.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
 
}

code de dimens.xml :
Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
<resources>
    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="radius">10dp</dimen>
    <dimen name="elevation">5dp</dimen>
</resources>

Merci beaucoup pour votre aide !