Witam
Jak sprawić aby TableRow z zawartością były zaraz obok siebie (w pionie)?
Tak to teraz wygląda
A tak wygląda kod
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context="ga.example.tictactoe.TwoPlayerActivity"
android:weightSum="60">
<TableLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical">
<TableRow
android:layout_weight="5"
android:weightSum="100"
android:gravity="center_vertical|center_horizontal"
android:baselineAligned="false"
android:orientation="vertical"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_column="0"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_1"
android:onClick="button_1"
android:layout_weight="30" />
<ImageView
android:layout_column="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_2"
android:onClick="button_2"
android:layout_weight="30"/>
<ImageView
android:layout_column="2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_3"
android:onClick="button_3"
android:layout_weight="30"/>
</TableRow>
<TableRow
android:layout_weight="5"
android:weightSum="100"
android:gravity="center_vertical|center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_4"
android:onClick="button_4"
android:layout_weight="30" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_5"
android:onClick="button_5"
android:layout_weight="30"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_6"
android:onClick="button_6"
android:layout_weight="30"/>
</TableRow>
<TableRow
android:layout_weight="5"
android:weightSum="100"
android:gravity="center_vertical|center_horizontal">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_7"
android:onClick="button_7"
android:layout_weight="30" />
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_8"
android:onClick="button_8"
android:layout_weight="30"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/nic"
android:id="@+id/button_9"
android:onClick="button_9"
android:layout_weight="30"/>
</TableRow>
</TableLayout>
</LinearLayout>