Le code XML :
<?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="match_parent"
android:orientation="vertical"
tools:context="com.elevation.MainActivity">
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#a591c6"
android:text="Bouton 1"
android:textColor="#FFF"
android:textSize="25sp"
android:elevation="4dp"
android:stateListAnimator="@null"/>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#f79c81"
android:text="Bouton 2"
android:textColor="#FFF"
android:textSize="25sp"
android:elevation="3dp"
android:stateListAnimator="@null"/>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#ea88b7"
android:text="Bouton 3"
android:textColor="#FFF"
android:textSize="25sp"
android:elevation="2dp"
android:stateListAnimator="@null"/>
<Button
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:background="#fede6f"
android:text="Bouton 4"
android:textColor="#FFF"
android:textSize="25sp"
android:elevation="1dp"
android:stateListAnimator="@null"/>
</LinearLayout>