У меня есть XML-файл для создания фрагмента. В этом фрагменте у меня 8 представлений, подобных этому:
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:columnCount="4"
android:layoutDirection="rtl"
android:rowCount="3">
<Button
style="@style/buttonStyle"
android:layout_width="80dp"
android:layout_height="108dp"
android:layout_row="0"
android:layout_rowSpan="3"
android:layout_column="0"
android:textSize="72sp"
tools:text="A" />
<Button
style="@style/buttonStyle"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_row="0"
android:layout_column="1"
tools:text="+" />
<TextView
style="@style/textViewStyle"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_row="1"
android:layout_column="1" />
<Button
style="@style/buttonStyle"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_row="2"
android:layout_column="1"
tools:text="-" />
<Button
style="@style/buttonStyle"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_row="0"
android:layout_column="2"
tools:text="+" />
<TextView
style="@style/textViewStyle"
android:layout_width="80dp"
android:layout_height="40dp"
android:layout_row="1"
android:layout_column="2" />
<Button
style="@style/buttonStyle"
android:layout_width="80dp"
android:layout_height="30dp"
android:layout_row="2"
android:layout_column="2"
tools:text="-" />
<TextView
style="@style/textViewStyle"
android:layout_width="80dp"
android:layout_height="108dp"
android:layout_row="0"
android:layout_rowSpan="3"
android:layout_column="3" />
</GridLayout>
, и результат выглядит так:
![enter image description here](https://i.stack.imgur.com/bJTmw.jpg)
Почему эти элементы не находятся в одной строке?В чем моя ошибка?В стилях я только что установил поля, фон и размер текста.Я попытался изменить ширину и высоту макета, чтобы он соответствовал родительскому, но результат по-прежнему тот же.