Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background" >
<EditText
android:layout_width="match_parent"
android:layout_height="40dip"
android:layout_marginLeft="20dip"
android:layout_marginRight="20dip"
android:scrollHorizontally="true"
android:inputType="number"
android:focusable="false"
android:background="#80000000"
android:ems="10"
android:id="@+id/number_edit"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="127dp" />
<GridLayout
android:layout_centerInParent="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/number_edit"
android:layout_centerHorizontal="true"
android:columnCount="3"
android:orientation="horizontal">
<Button android:text="1"
android:layout_rowWeight="0.33"
android:id="@+id/text_1"
android:onClick="input"/>
<Button android:text="2"
android:layout_rowWeight="0.33"
android:id="@+id/text_2"
android:onClick="input"/>
<Button android:text="3"
android:id="@+id/text_3"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="4"
android:id="@+id/text_4"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="5"
android:id="@+id/text_5"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="6"
android:id="@+id/text_6"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="7"
android:id="@+id/text_7"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="8"
android:id="@+id/text_8"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="9"
android:id="@+id/text_9"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="*"
android:id="@+id/text_cross"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="0"
android:id="@+id/text_0"
android:layout_rowWeight="0.33"
android:onClick="input"/>
<Button android:text="X"
android:layout_rowWeight="0.33"
android:id="@+id/text_backspace"
android:onClick="input"/>
<Button android:text="CALL"
android:layout_rowWeight="1"
android:layout_gravity="fill"
android:layout_columnSpan="3"
android:id="@+id/text_CALL"
android:onClick="input"/>
</GridLayout>
</RelativeLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment