You are on page 1of 5

SANA IRSHAD

Bsem-f18-145

6A
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
>

<TextView
android:layout_width="match_parent"
android:layout_height="400dp"
android:background="@color/white" />

<LinearLayout
android:weightSum="4"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"

android:background="@color/black"

>

<LinearLayout
android:weightSum="4"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:text="7"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="8"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="9"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="X"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>

</LinearLayout>
<LinearLayout
android:weightSum="4"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:text="4"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="5"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="6"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="/"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>

</LinearLayout>
<LinearLayout
android:weightSum="4"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:text="1"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="2"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="3"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="*"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>

</LinearLayout>
<LinearLayout
android:weightSum="4"
android:layout_weight="1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="0dp">
<Button
android:text="0"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="."
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="+"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>
<Button
android:text="-"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="match_parent"/>

</LinearLayout>

</LinearLayout>

</LinearLayout>

You might also like