<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        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"
        tools:context=".panic.CalculatorActivity"
        android:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
            android:id="@+id/topAppBarLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fitsSystemWindows="true"
            app:liftOnScroll="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

        <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                style="@style/Widget.MaterialComponents.Toolbar.PrimarySurface" />

    </com.google.android.material.appbar.AppBarLayout>

    <TextView
            android:id="@+id/textView"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:gravity="bottom|end"
            android:padding="5dp"
            android:textAlignment="textEnd"
            android:textSize="22sp"
            android:typeface="monospace"
            app:layout_constraintBottom_toTopOf="@+id/ce"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/topAppBarLayout"
            tools:text="1337+42" />

    <Button
            android:id="@+id/times"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="×"
            app:layout_constraintBottom_toTopOf="@+id/seven"
            app:layout_constraintStart_toStartOf="parent"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/divided"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="÷"
            app:layout_constraintBottom_toTopOf="@+id/eight"
            app:layout_constraintStart_toEndOf="@+id/times"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/c"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="c"
            android:text="C"
            app:layout_constraintBottom_toTopOf="@+id/nine"
            app:layout_constraintStart_toEndOf="@+id/divided"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/seven"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="7"
            app:layout_constraintBottom_toTopOf="@+id/four"
            app:layout_constraintStart_toStartOf="parent"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/eight"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="8"
            app:layout_constraintBottom_toTopOf="@+id/five"
            app:layout_constraintStart_toEndOf="@+id/seven"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/nine"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="9"
            app:layout_constraintBottom_toTopOf="@+id/six"
            app:layout_constraintStart_toEndOf="@+id/eight"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/ce"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:onClick="ce"
            android:text="CE"
            app:layout_constraintBottom_toTopOf="@+id/plus"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/nine"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/four"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="4"
            app:layout_constraintBottom_toTopOf="@+id/one"
            app:layout_constraintStart_toStartOf="parent"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/five"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="5"
            app:layout_constraintBottom_toTopOf="@+id/two"
            app:layout_constraintStart_toEndOf="@+id/four"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/six"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="6"
            app:layout_constraintBottom_toTopOf="@+id/three"
            app:layout_constraintStart_toEndOf="@+id/five"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/plus"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="+"
            app:layout_constraintBottom_toTopOf="@+id/minus"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/six"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/minus"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="-"
            app:layout_constraintBottom_toTopOf="@+id/equals"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@+id/three"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/one"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="1"
            app:layout_constraintBottom_toTopOf="@+id/zero"
            app:layout_constraintStart_toStartOf="parent"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/two"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="2"
            app:layout_constraintBottom_toTopOf="@+id/comma"
            app:layout_constraintStart_toEndOf="@+id/one"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/three"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="3"
            app:layout_constraintBottom_toTopOf="@+id/percent"
            app:layout_constraintStart_toEndOf="@+id/two"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/zero"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="0"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/comma"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="number"
            android:text="."
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@+id/zero"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/percent"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:layout_marginLeft="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="%"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintStart_toEndOf="@+id/comma"
            tools:ignore="HardcodedText" />

    <Button
            android:id="@+id/equals"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_marginBottom="8dp"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:onClick="op"
            android:text="="
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toEndOf="@+id/three"
            app:layout_constraintTop_toTopOf="@+id/three"
            tools:ignore="HardcodedText" />

</androidx.constraintlayout.widget.ConstraintLayout>
