AIDE J'utilise TableLayout & TableRow, dans l'image ci-dessous, j'essaie de marges n ° 4 et n ° 6 ensemble tout comme n ° 1 mais je n'avais aucune idée de comment le faire. Pour n ° 1, j'ai pu faire parce que je viens d'utiliser Layout-weight pour diviser l'écran en 3row, 3col.Comment utiliser TableLayout pour créer le design que je veux?
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:stretchColumns="*">
<TableRow
android:layout_weight="2"
android:id="@+id/tableRow1">
<TextView
android:text="1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:background="@android:color/holo_blue_dark" />
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_span="2"
android:stretchColumns="*"
android:id="@+id/tableLayout1">
<TableRow
android:layout_weight="1"
android:id="@+id/tableRow1"
android:background="@android:color/holo_red_dark">
<TextView
android:text="2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_span="2"
android:gravity="center" />
</TableRow>
<TableRow
android:layout_weight="1"
android:id="@+id/tableRow3">
<TextView
android:text="3"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" />
<TextView
android:text="4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" />
</TableRow>
</TableLayout>
</TableRow>
<TableRow
android:layout_weight="1"
android:id="@+id/tableRow1">
<TextView
android:text="5"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_span="2"
android:gravity="center"
android:background="@android:color/holo_green_dark" />
<TextView
android:text="6"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="right" />
</TableRow>
ci-dessous img est le résultat que je veut
consulter ma réponse. Cela devrait vous aider. –