<?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"
    tools:ignore="MissingPrefix"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@color/white"
    tools:context="ch.pizzapp.android.activity.OrderHistoryDetailsActivity"
    android:focusable="true"
    android:focusableInTouchMode="true">

    <ch.pizzapp.android.view.AppToolbar
        android:id="@+id/orderHistoryDetailsToolbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:title="@string/activity_title_order_history_details"
        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/orderHistoryDetailsToolbar">

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

            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_alignParentBottom="true"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:scrollbars="none">

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

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderDatePizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_date" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderStatusPizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_status"
                        android:visibility="gone"/>

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderShippingTimePizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_shipping_time" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderTotalPizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_total" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderPaymentMethodPizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_payment_method" />

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

                        <TextView
                            fontPath="fonts/Quicksand-Bold.ttf"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/order_products"
                            android:textColor="@color/black"
                            android:textSize="12sp" />

                        <TextView
                            android:id="@+id/orderProductsTextView"
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:layout_marginTop="4dp"
                            android:textColor="@color/red" />

                    </LinearLayout>

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderFullnamePizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_fullname" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderShippingMethodPizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_shipping_method" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderShippingAddressPizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_shipping_address" />

                    <ch.pizzapp.android.view.AppInfoView
                        android:id="@+id/orderNotePizzalinkInfoLayout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:description="@string/order_history_order_note" />

                    <Button
                        android:id="@+id/repeatOrderButton"
                        android:textColor="@color/white"
                        android:layout_width="match_parent"
                        android:layout_height="48dp"
                        android:background="@drawable/background_button_pizzapp_gray"
                        android:layout_margin="16dp"
                        android:textSize="12sp"
                        android:text="@string/repeat_order_uppercased"/>
                    
                    <android.support.v4.widget.Space
                        android:layout_width="match_parent"
                        android:layout_height="96dp" />

                </LinearLayout>

            </ScrollView>

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

    </RelativeLayout>

</RelativeLayout>