Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="org.technobyte.gridlayout.MainActivity">
<GridLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true">
<Button
android:text="ADD +"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnAdd"
android:layout_column="0"
android:layout_row="0" />
<Button
android:text="SUB -"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnSub"
android:layout_column="1"
android:layout_row="0" />
<Button
android:text="MUL *"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnMul"
android:layout_column="3"
android:layout_row="0"
android:elevation="0dp" />
<Button
android:text="DIV /"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnDiv"
android:layout_column="4"
android:layout_row="0" />
<Button
android:text="CALCULATE ="
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/btnCal"
android:layout_column="0"
android:layout_row="2"
android:layout_columnWeight="0"
android:layout_gravity="top|center"
android:layout_columnSpan="5"
android:minWidth="352dp" />
</GridLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.