<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    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.AddAddressActivity"
    android:focusable="true"
    android:focusableInTouchMode="true">

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

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/addAddressToolbar">

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

        <android.support.v7.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/white"
            app:cardCornerRadius="4dp"
            android:layout_margin="12dp">

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

                <ScrollView
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_alignParentBottom="true"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentStart="true"
                    android:layout_above="@+id/addNewAddressButton">

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:orientation="vertical"
                        android:background="@color/white">

                        <ch.pizzaleu.android.view.AppEditText
                            android:id="@+id/address1PizzalinkEditText"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:edittextTheme="navy"
                            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:edittextTheme="navy"
                            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:dropdownTheme="navy"
                            app:dropdownHintView="@string/city"/>

                        <ch.pizzaleu.android.view.AppDropdownView
                            android:id="@+id/countryPizzalinkDropdown"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            app:dropdownTheme="navy"
                            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:dropdownTheme="navy"
                            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/addNewAddressButton"
                    android:layout_width="match_parent"
                    android:layout_height="48dp"
                    android:layout_marginTop="16dp"
                    android:layout_marginBottom="16dp"
                    style="@style/PizzappGrayButton"
                    android:text="@string/add"
                    android:layout_alignParentBottom="true" />

            </RelativeLayout>

        </android.support.v7.widget.CardView>

    </RelativeLayout>

</RelativeLayout>
