<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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:id="@+id/login_fragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?android:colorBackground">

    <androidx.core.widget.NestedScrollView style="@style/LoginFormScrollView">

        <LinearLayout style="@style/LoginFormContainer">

            <ImageView
                style="@style/LoginLogo"
                tools:ignore="ContentDescription" />

            <TextView
                android:id="@+id/loginTitle"
                style="@style/Widget.Vector.TextView.Title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/layout_vertical_margin"
                android:text="@string/login_please_choose_a_user_name"
                android:textColor="?vctr_content_primary" />

            <TextView
                android:id="@+id/loginSubtitle"
                style="@style/Widget.Vector.TextView.Body"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="32dp"
                android:textColor="?vctr_content_secondary"
                tools:text="@string/login_signup_to" />

            <com.google.android.material.textfield.TextInputLayout
                android:id="@+id/loginFieldTil"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="32dp"
                android:hint="@string/login_signup_username_hint"
                app:errorEnabled="true">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/loginField"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textEmailAddress"
                    android:maxLines="1" />

            </com.google.android.material.textfield.TextInputLayout>

            <TextView
                android:id="@+id/loginChooseHelp"
                style="@style/Widget.Vector.TextView.Caption"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/login_please_choose_a_user_name_help_2"
                android:textColor="?vctr_content_secondary"
                android:textStyle="italic" />

            <Button
                android:id="@+id/loginSubmit"
                style="@style/Widget.Vector.Button.Login"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginTop="8dp"
                android:text="@string/_continue"
                tools:enabled="false" />

            <!-- SSO Option -->
            <!-- Social Logins buttons -->
            <LinearLayout
                android:id="@+id/loginSocialLoginContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:orientation="vertical"
                android:visibility="gone"
                tools:visibility="visible">

                <TextView
                    android:id="@+id/loginSocialLoginHeader"
                    style="@style/Widget.Vector.TextView.Body"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="16dp"
                    android:gravity="center"
                    android:text="@string/login_social_continue"
                    android:textColor="?vctr_content_secondary" />

                <im.vector.app.features.login.SocialLoginButtonsView
                    android:id="@+id/loginSocialLoginButtons"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    tools:signMode="signin" />

            </LinearLayout>

        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</FrameLayout>
