0% found this document useful (0 votes)
14 views4 pages

Appdev

Uploaded by

soperbich101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Appdev

Uploaded by

soperbich101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

XML:

<?xml version="1.0" encoding="utf-8"?>


<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/androi
d"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
tools:context=".MainActivity">

<TextView
android:id="@+id/resultTextView"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"

android:text="0"
android:textAlignment="center"
android:textColor="#ffffff"
android:textSize="24sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<GridLayout
android:id="@+id/gridLayout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:columnCount="4"
android:rowCount="5"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

app:layout_constraintTop_toBottomOf="@+id/resultTextView
">

<Button
android:id="@+id/btn_clear"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="C" />
<Button
android:id="@+id/btn_divide"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="/" />

<Button
android:id="@+id/btn_multiply"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="*" />

<Button
android:id="@+id/btn_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="&lt;-" />

<Button
android:id="@+id/btn_7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="7"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="8"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="9"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_subtract"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="-" />

<Button
android:id="@+id/btn_4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="4"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="5"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="6"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_add"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="+" />

<Button
android:id="@+id/btn_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="1"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="2"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="3"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_equals"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#00A8E8"
android:text="=" />

<Button
android:id="@+id/btn_0"

android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#5C677D"
android:text="0"
android:textColor="#ffffff" />

<Button
android:id="@+id/btn_dot"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:backgroundTint="#0466C8"
android:text="." />
</GridLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

You might also like