Anda di halaman 1dari 2

<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"

tools:context=".MainActivity">

<TextView
android:id="@+id/txtScreen"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:gravity="right|center_vertical"
android:maxLength="16"
android:padding="10dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textSize="30sp"
android:typeface="serif" />

<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/txtScreen"
android:orientation="vertical">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1">
<Button
android:background="@drawable/button"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="30sp"
android:id="@+id/btnSeven"
android:text="7" />
<Button
android:layout_width="0dp"
android:background="@drawable/button"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="30sp"
android:id="@+id/btnEight"
android:text="8" />
<Button
android:layout_width="0dp"
android:background="@drawable/button"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="30sp"
android:id="@+id/btnNine"
android:text="9"/>
<Button
android:layout_width="0dp"
android:background="@drawable/button"
android:layout_height="match_parent"
android:layout_weight="1"
android:textSize="30sp"
android:id="@+id/btnDivide"

Anda mungkin juga menyukai