I am programming an Android app and I need to create a grid with 4 rows. In each row I need to put different elements. The problem is that I can't insert the elements in the desired row. In my example the ImageButton is inserted in the first row although I want to insert it in the second row. Does anyone have a solution how to do this with XML ? Thank you
<GridLayout<?xml version="1.0" encoding="utf-8"?>
android:id="@+id/GridLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:columnCount="2"
android:orientation="horizontal"
android:rowCount="4"
tools:context=".GridXMLActivity"
tools:layout_editor_absoluteX="56dp"
tools:layout_editor_absoluteY="0dp">
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="160dp"
android:layout_height="90dp"
android:layout_row="2"
android:layout_gravity="left|top"
android:src="@drawable/scene1" />
</GridLayout>
