Skip to content

Instantly share code, notes, and snippets.

@AasemJS
Created June 18, 2017 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AasemJS/fc1136b42f3a4880671e96c211073f3a to your computer and use it in GitHub Desktop.
Save AasemJS/fc1136b42f3a4880671e96c211073f3a to your computer and use it in GitHub Desktop.
<?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