<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/login_activity_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="io.github.wulkanowy.ui.login.LoginActivity">

    <!-- Login progress -->
    <RelativeLayout
        android:id="@+id/login_activity_progress_container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:gravity="center"
        android:visibility="gone">

        <ProgressBar
            android:id="@+id/login_activity_progress_bar"
            style="?android:attr/progressBarStyleHorizontal"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_centerHorizontal="true"
            android:indeterminate="true"
            android:minHeight="30dp"
            android:minWidth="220dp" />

        <TextView
            android:id="@+id/login_activity_progress_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignBottom="@+id/login_activity_progress_bar"
            android:layout_centerHorizontal="true"
            android:layout_marginBottom="42dp" />
    </RelativeLayout>

    <ScrollView
        android:id="@+id/login_activity_form_scroll"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:id="@+id/login_activity_form_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="24dp"
                android:text="@string/login_heading" />

            <android.support.design.widget.TextInputLayout
                android:id="@+id/login_activity_email_text_input"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="12dp">

                <EditText
                    android:id="@+id/login_activity_email_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/prompt_email"
                    android:inputType="textEmailAddress"
                    android:maxLines="1" />

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

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

                <EditText
                    android:id="@+id/login_activity_pass_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:fontFamily="sans-serif"
                    android:hint="@string/prompt_password"
                    android:imeActionLabel="@string/action_sign_in"
                    android:imeOptions="actionDone"
                    android:inputType="textPassword"
                    android:maxLines="1" />

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

            <android.support.design.widget.TextInputLayout
                android:id="@+id/login_activity_symbol_text_input"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:visibility="gone">

                <AutoCompleteTextView
                    android:id="@+id/login_activity_symbol_edit"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/prompt_symbol"
                    android:imeActionLabel="@string/action_sign_in"
                    android:imeOptions="actionDone"
                    android:importantForAutofill="noExcludeDescendants"
                    android:inputType="textAutoComplete"
                    android:maxLines="1" />

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

            <Button
                android:id="@+id/login_activity_sign_button"
                style="?android:textAppearanceSmall"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="24dp"
                android:layout_marginTop="16dp"
                android:text="@string/action_sign_in"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/login_activity_create_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="24dp"
                android:text="@string/action_create_account" />

            <TextView
                android:id="@+id/login_activity_forgot_text"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/action_forgot_password" />

        </LinearLayout>
    </ScrollView>
</RelativeLayout>
