<androidx.constraintlayout.widget.ConstraintLayout 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">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

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

            <ImageView
                android:id="@+id/logoImageView"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:src="@drawable/riotx_logo" />

            <TextView
                android:id="@+id/riotx_no_registration_notice"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_marginTop="32dp"
                android:gravity="center"
                android:padding="8dp"
                android:text="@string/riotx_no_registration_notice"
                android:textColor="?vctr_notice_secondary"
                android:textSize="15sp" />

            <com.google.android.material.textfield.TextInputLayout
                style="@style/VectorTextInputLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="14dp"
                android:hint="@string/auth_user_name_placeholder">

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

            <FrameLayout
                android:id="@+id/passwordContainer"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp">

                <com.google.android.material.textfield.TextInputLayout
                    style="@style/VectorTextInputLayout"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:hint="@string/auth_password_placeholder">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/passwordField"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:ems="10"
                        android:inputType="textPassword"
                        android:maxLines="1"
                        android:paddingEnd="48dp"
                        android:paddingRight="48dp"
                        tools:ignore="RtlSymmetry" />

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

                <ImageView
                    android:id="@+id/passwordReveal"
                    android:layout_width="@dimen/layout_touch_size"
                    android:layout_height="@dimen/layout_touch_size"
                    android:layout_gravity="end"
                    android:layout_marginTop="8dp"
                    android:background="?attr/selectableItemBackground"
                    android:scaleType="center"
                    android:src="@drawable/ic_eye_black"
                    android:tint="?attr/colorAccent" />

            </FrameLayout>

            <com.google.android.material.textfield.TextInputLayout
                style="@style/VectorTextInputLayout"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="16dp"
                android:hint="@string/settings_home_server">

                <com.google.android.material.textfield.TextInputEditText
                    android:id="@+id/homeServerField"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textUri"
                    android:imeOptions="actionDone"
                    android:maxLines="1" />

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

            <com.google.android.material.button.MaterialButton
                android:id="@+id/authenticateButton"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginTop="22dp"
                android:text="@string/auth_login" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/authenticateButtonSso"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="end"
                android:layout_marginTop="22dp"
                android:text="@string/auth_login_sso"
                android:visibility="gone"
                tools:visibility="visible" />

        </LinearLayout>

    </ScrollView>

    <View
        android:id="@+id/touchArea"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:background="?vctr_waiting_background_color"
        android:clickable="true"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ProgressBar
        android:id="@+id/progressBar"
        android:layout_width="60dp"
        android:layout_height="60dp"
        android:layout_margin="8dp"
        android:visibility="gone"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:visibility="visible" />

</androidx.constraintlayout.widget.ConstraintLayout>

