<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    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:orientation="vertical"
    android:background="@color/white"
    tools:context="ch.pizzaleu.android.activity.RegisterActivity"
    android:focusable="true"
    android:focusableInTouchMode="true">

    <ch.pizzaleu.android.view.AppToolbar
        android:id="@+id/registerToolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:title="@string/activity_title_register"
        android:background="@color/white"
        app:showBackIcon="true"
        app:titleTextColor="@color/black" />

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

        <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            android:src="@drawable/background_wood" />

        <TextView
            android:id="@+id/registerCouponCodeTextView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/register_coupon_code_description"
            android:background="@color/yellow"
            android:textColor="@color/black"
            android:gravity="center_horizontal"
            android:paddingTop="16dp"
            android:paddingBottom="16dp"
            android:paddingStart="24dp"
            android:paddingEnd="24dp"/>

        <ScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/registerButton"
            android:layout_below="@+id/registerCouponCodeTextView">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="vertical">

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/firstnamePizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:inputType="name"
                    app:hint="@string/firstname"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/lasstnamePizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:inputType="name"
                    app:hint="@string/lastname"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/telephonePizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:hint="@string/telephone"
                    app:inputType="phone"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/emailPizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:hint="@string/email"
                    app:inputType="email"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/passwordPizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:hint="@string/password"
                    app:inputType="password"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/passwordAgainPizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:hint="@string/password_again"
                    app:inputType="password"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/address1PizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:inputType="address"
                    app:hint="@string/addres_line_1"/>

                <ch.pizzaleu.android.view.AppEditText
                    android:id="@+id/postcodePizzalinkEditText"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:inputType="postcode"
                    app:hint="@string/postcode"/>

                <ch.pizzaleu.android.view.AppDropdownView
                    android:id="@+id/cityPizzalinkDropdown"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:dropdownHintView="@string/city"/>

                <ch.pizzaleu.android.view.AppDropdownView
                    android:id="@+id/countryPizzalinkDropdown"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:dropdownHintView="@string/country"
                    android:visibility="gone"/>

                <ch.pizzaleu.android.view.AppDropdownView
                    android:id="@+id/zonePizzalinkDropdown"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    app:dropdownHintView="@string/zone"
                    android:visibility="gone"/>

                <android.support.v4.widget.Space
                    android:layout_width="match_parent"
                    android:layout_height="48dp" />

            </LinearLayout>

        </ScrollView>

        <Button
            android:id="@+id/registerButton"
            android:layout_width="match_parent"
            android:layout_height="48dp"
            android:layout_marginTop="16dp"
            android:layout_marginBottom="16dp"
            style="@style/PizzappGrayButton"
            android:text="@string/button_register"
            android:layout_alignParentBottom="true" />

    </RelativeLayout>


</LinearLayout>
