J'essaye de copier le do rouge à tous les autres carrés mais quand j'essaye de faire cela, j'obtiens l'erreur "column index (start + span) ne doit pas dépasser le nombre de colonnes »les index de colonne (start + span) ne doivent pas dépasser le nombre de colonnes
Je mets la colonne et le nombre de lignes à 3. mon code XML est ci-dessous.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context="com.example.zubai.connect3.MainActivity">
<GridLayout
android:id="@+id/gridLayout2"
android:layout_width="match_parent"
android:layout_height="360dp"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:background="@drawable/board"
android:columnCount="3"
android:rowCount="3"
tools:ignore="UselessParent">
<ImageView
android:id="@+id/imageView"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_column="0"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_row="0"
android:contentDescription=""
android:src="@drawable/red"
tools:ignore="ContentDescription,RtlHardcoded" />
<ImageView
android:id="@+id/imageView1"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_column="0"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_row="0"
android:contentDescription=""
android:src="@drawable/red"
tools:ignore="ContentDescription,RtlHardcoded" />
<ImageView
android:id="@+id/imageView8"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_column="0"
android:layout_marginLeft="20dp"
android:layout_marginTop="10dp"
android:layout_row="0"
android:contentDescription=""
android:src="@drawable/red"
tools:ignore="ContentDescription,RtlHardcoded" />
</GridLayout>
</RelativeLayout>