<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright 2019, The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<layout 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">

    <data>

        <variable
            name="viewModel"
            type="com.example.android.gdgfinder.add.AddGdgViewModel" />
    </data>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            tools:context=".add.AddGdgFragment">

            <TextView
                android:id="@+id/textViewIntro"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/spacing_normal"
                android:layout_marginTop="@dimen/spacing_normal"
                android:layout_marginEnd="@dimen/spacing_normal"
                android:text="@string/add_gdg"
                android:textColor="#AAAAAA"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <ImageView
                android:id="@+id/imageView"
                android:layout_width="411dp"
                android:layout_height="230dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="2dp"
                android:scaleType="centerCrop"
                app:layout_constraintBottom_toTopOf="@+id/EditTextName"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/textViewIntro"
                app:srcCompat="@drawable/behind"
                tools:src="@tools:sample/avatars" />


            <EditText
                android:id="@+id/EditTextName"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="8dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="4dp"
                android:singleLine="true"
                app:layout_constraintBottom_toTopOf="@+id/EditTextEmail"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/imageView"></EditText>

            <EditText
                android:id="@+id/EditTextEmail"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="4dp"
                android:singleLine="true"
                app:layout_constraintBottom_toTopOf="@+id/EditTextCity"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextName"></EditText>

            <EditText
                android:id="@+id/EditTextCity"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="4dp"
                android:singleLine="true"
                app:layout_constraintBottom_toTopOf="@+id/EditTextCountry"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextEmail"></EditText>

            <EditText
                android:id="@+id/EditTextCountry"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="4dp"
                android:singleLine="true"
                app:layout_constraintBottom_toTopOf="@+id/EditTextRegion"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextCity"></EditText>

            <EditText
                android:id="@+id/EditTextRegion"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="4dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="4dp"
                android:singleLine="true"
                app:layout_constraintBottom_toTopOf="@+id/EditTextWhy"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextCountry"></EditText>

            <TextView
                android:id="@+id/labelTextWhy"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="@dimen/spacing_normal"
                android:layout_marginBottom="1dp"
                android:text="@string/motivation"
                app:layout_constraintBottom_toTopOf="@+id/EditTextWhy"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextRegion" />

            <EditText
                android:id="@+id/EditTextWhy"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="32dp"
                android:layout_marginTop="32dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="8dp"
                android:ems="10"
                android:inputType="textMultiLine"
                app:layout_constraintBottom_toTopOf="@+id/button"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextRegion" />

            <Button
                android:id="@+id/button"
                android:layout_width="40dp"
                android:layout_height="24dp"
                android:layout_marginEnd="40dp"
                android:layout_marginBottom="12dp"
                android:backgroundTint="#00FF00"
                android:onClick="@{() -> viewModel.onSubmitApplication()}"
                android:text="Ok"
                android:textColor="#FF0000"
                android:textSize="8sp"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/EditTextWhy" />

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