<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:bind="http://schemas.android.com/apk/res-auto">

    <data>
        <variable name="editedObject" type="pl.snowdog.dzialajlokalnie.events.CreateNewObjectEvent"/>
    </data>

    <RelativeLayout
        android:id="@+id/rootView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        >
        <ScrollView
            android:layout_above="@+id/lower_buttons_container"
            android:layout_alignParentTop="true"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">
        <RelativeLayout
            android:paddingLeft="@dimen/activity_horizontal_margin"
            android:paddingRight="@dimen/activity_horizontal_margin"
            android:paddingTop="@dimen/activity_vertical_margin"
            android:paddingBottom="@dimen/activity_vertical_margin"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:id="@+id/top_container"

            >

            <LinearLayout
                android:id="@+id/nameContainer"
                android:orientation="horizontal"
                android:layout_alignParentTop="true"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
                <android.support.design.widget.TextInputLayout
                    android:id="@+id/etNameWrapper"
                    android:layout_weight="0.5"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">

                    <EditText
                        android:id="@+id/etName"
                        android:text="@{editedObject.name}"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:nextFocusDown="@+id/etSurname"
                        android:inputType="textCapSentences"
                        android:hint="@string/name" />

                </android.support.design.widget.TextInputLayout>

                <android.support.design.widget.TextInputLayout
                    android:id="@+id/etSurnameWrapper"
                    android:layout_weight="0.5"

                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    >

                    <EditText
                        android:id="@+id/etSurname"
                        android:text="@{editedObject.surname}"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:inputType="textCapSentences"
                        android:maxLines="8"
                        android:singleLine="false"
                        android:hint="@string/surname" />

                </android.support.design.widget.TextInputLayout>
            </LinearLayout>


            <android.support.design.widget.TextInputLayout
                android:id="@+id/etEmailWrapper"
                android:layout_below="@id/nameContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <EditText
                    android:id="@+id/etEmail"
                    android:text="@{editedObject.email}"
                    android:inputType="textEmailAddress"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:maxLines="8"
                    android:singleLine="false"
                    android:hint="@string/email" />

            </android.support.design.widget.TextInputLayout>

            <android.support.design.widget.TextInputLayout
                android:id="@+id/etPasswordWrapper"
                android:layout_below="@id/etEmailWrapper"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <EditText
                    android:id="@+id/etPassword"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textPassword"
                    android:maxLines="8"
                    android:singleLine="false"

                    android:hint="@string/pass" />

            </android.support.design.widget.TextInputLayout>


            <android.support.design.widget.TextInputLayout
                android:id="@+id/etDescriptionWrapper"
                android:layout_below="@id/etPasswordWrapper"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                >

                <EditText
                    android:id="@+id/etDescription"
                    android:text="@{editedObject.description}"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textCapSentences|textMultiLine"
                    android:maxLines="8"
                    android:singleLine="false"

                    android:hint="@string/user_description" />

            </android.support.design.widget.TextInputLayout>

        </RelativeLayout>
        </ScrollView>
        <include
            android:id="@+id/lower_buttons_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/include_lower_buttons_container" />
    </RelativeLayout>
</layout>
