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

    <data>
        <variable
            name="clickHandler"
            type="com.mastercoding.jetpacky.AddNewContactActivity.AddNewContactActivityClickHandlers" />

        <variable
            name="contact"
            type="com.mastercoding.jetpacky.Contact" />
    </data>


    <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"
        android:layout_margin="16dp"
        tools:context=".AddNewContactActivity">


        <EditText
            android:id="@+id/contactNameET"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="40dp"
            android:hint="Name"
            android:text="@={contact.name}"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="0.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <EditText
            android:id="@+id/contactEmailET"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:text="@={contact.email}"
            android:hint="Email"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/contactNameET" />


        <Button
            android:id="@+id/submitBTN"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="48dp"
            android:text="Submit"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"

            android:onClick="@{clickHandler::onSubmitClicked}"
            app:layout_constraintTop_toBottomOf="@+id/contactEmailET" />


    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>
