leithdm
4/19/2020 - 1:15 PM

GridLayout using gravity with buttons (e.g. 4 rows, 2 columns GridLayout)

        <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />
            
            
                    <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />

        <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />

        <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />
            
                    <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />
        <Button
            android:id="@+id/button"
            android:text="Button"
            android:gravity="fill"
            app:layout_rowWeight="1"
            app:layout_columnWeight="1"
            />