<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2017. Johnny S. R. Hansen
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in all
  ~ copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~ SOFTWARE.
  -->

<android.support.constraint.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="com.johnnyredzin.calcapp.MainActivity"
    tools:layout_editor_absoluteY="0dp"
    tools:layout_editor_absoluteX="0dp" >


    <GridLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:columnCount="4"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.0"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.0">

        <fragment
            android:id="@+id/outputFragment"
            android:name="com.johnnyredzin.calcapp.fragments.OutputLegacyFragment"
            android:layout_column="0"
            android:layout_columnSpan="4"
            android:layout_row="0"
            android:layout_rowSpan="2"
            android:layout_width="match_parent"
            android:layout_height="160dp" />

        <Button
            android:id="@+id/button0"
            style="@style/AppTheme.CalcButtonWideNumeric"
            android:layout_column="0"
            android:layout_row="6"
            android:onClick="button0"
            android:text="@string/button_0" />

        <Button
            android:id="@+id/buttonPoint"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="2"
            android:layout_row="6"
            android:onClick="buttonPoint"
            android:text="@string/button_point" />

        <Button
            android:id="@+id/buttonEnter"
            style="@style/AppTheme.CalcButton"
            android:layout_column="3"
            android:layout_row="6"
            android:onClick="buttonEquals"
            android:text="@string/button_enter" />

        <Button
            android:id="@+id/button1"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="0"
            android:layout_row="5"
            android:onClick="button1"
            android:text="@string/button_1" />

        <Button
            android:id="@+id/button2"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="1"
            android:layout_row="5"
            android:onClick="button2"
            android:text="@string/button_2" />

        <Button
            android:id="@+id/button3"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="2"
            android:layout_row="5"
            android:onClick="button3"
            android:text="@string/button_3" />

        <Button
            android:id="@+id/buttonAdd"
            style="@style/AppTheme.CalcButton"
            android:layout_column="3"
            android:layout_row="5"
            android:onClick="buttonAdd"
            android:text="@string/button_add" />

        <Button
            android:id="@+id/button6"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="2"
            android:layout_row="4"
            android:onClick="button6"
            android:text="@string/button_6" />

        <Button
            android:id="@+id/button5"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="1"
            android:layout_row="4"
            android:onClick="button5"
            android:text="@string/button_5" />

        <Button
            android:id="@+id/button4"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="0"
            android:layout_row="4"
            android:onClick="button4"
            android:text="@string/button_4" />

        <Button
            android:id="@+id/button7"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="0"
            android:layout_row="3"
            android:onClick="button7"
            android:text="@string/button_7" />

        <Button
            android:id="@+id/button8"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="1"
            android:layout_row="3"
            android:onClick="button8"
            android:text="@string/button_8" />

        <Button
            android:id="@+id/button9"
            style="@style/AppTheme.CalcButtonNumeric"
            android:layout_column="2"
            android:layout_row="3"
            android:onClick="button9"
            android:text="@string/button_9" />

        <Button
            android:id="@+id/buttonSubtract"
            style="@style/AppTheme.CalcButton"
            android:layout_column="3"
            android:layout_row="4"
            android:onClick="buttonSubtract"
            android:text="@string/button_subtract" />

        <Button
            android:id="@+id/buttonDivide"
            style="@style/AppTheme.CalcButton"
            android:layout_column="3"
            android:layout_row="3"
            android:onClick="buttonDivide"
            android:text="@string/button_divide" />

        <Button
            android:id="@+id/buttonMultiply"
            style="@style/AppTheme.CalcButton"
            android:layout_column="3"
            android:layout_row="2"
            android:onClick="buttonMultiply"
            android:text="@string/button_multiply" />

        <Button
            android:id="@+id/buttonRoot"
            style="@style/AppTheme.CalcButtonSpecial"
            android:layout_column="1"
            android:layout_row="2"
            android:onClick="buttonRoot"
            android:text="@string/button_root" />

        <Button
            android:id="@+id/buttonClear"
            style="@style/AppTheme.CalcButtonSpecial"
            android:layout_column="0"
            android:layout_row="2"
            android:onClick="buttonClear"
            android:text="@string/button_clear" />

        <Button
            android:id="@+id/buttonModulo"
            style="@style/AppTheme.CalcButtonSpecial"
            android:layout_column="2"
            android:layout_row="2"
            android:onClick="buttonModulo"
            android:text="@string/button_modulo" />


    </GridLayout>


</android.support.constraint.ConstraintLayout>