<?xml version="1.0" encoding="utf-8"?>
<GridLayout 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"
    tools:context=".MainActivity"
    android:id="@+id/gridLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal"
    android:padding="10dp"
    android:columnCount="3"
    android:rowCount="3">

    <!-- Composant carré 1 -->
    <View
        android:id="@+id/carre0"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1" />

    <!-- Composant carré 2 -->
    <View
        android:id="@+id/carre1"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1"/>

    <!-- Composant carré 3 -->
    <View
        android:id="@+id/carre2"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1" />

    <!-- Composant carré 4 -->
    <View
        android:id="@+id/carre3"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1"/>

    <!-- Composant carré 5 -->
    <View
        android:id="@+id/carre4"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1"/>

    <!-- Composant carré 6 -->
    <View
        android:id="@+id/carre5"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1" />

    <!-- Composant carré 7 -->
    <View
        android:id="@+id/carre6"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1" />

    <!-- Composant carré 8 -->
    <View
        android:id="@+id/carre7"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1"/>

    <!-- Composant carré 9 -->
    <View
        android:id="@+id/carre8"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_columnWeight="1"
        android:layout_rowWeight="1"/>

</GridLayout>