<LinearLayout 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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical"
    tools:context="bou.amine.apps.readerforselfossv2.android.LoginActivity">

    <com.google.android.material.appbar.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <androidx.appcompat.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:theme="@style/ToolBarStyle"
            app:popupTheme="?attr/toolbarPopupTheme" />

    </com.google.android.material.appbar.AppBarLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="@dimen/activity_horizontal_margin">
        <!-- Login progress -->
        <ProgressBar
            android:id="@+id/loginProgress"
            style="?android:attr/progressBarStyleLarge"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="8dp"
            android:visibility="gone" />

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

            <EditText
                android:id="@+id/urlView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/prompt_url"
                android:imeOptions="actionUnspecified"
                android:importantForAutofill="no"
                android:inputType="textUri"
                android:maxLines="1"
                android:minHeight="48dp" />

            <com.google.android.material.switchmaterial.SwitchMaterial
                android:id="@+id/selfSigned"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/disable_ssl"
                android:textAlignment="viewStart" />

            <com.google.android.material.switchmaterial.SwitchMaterial
                android:id="@+id/withLogin"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/withLoginSwitch"
                android:textAlignment="viewStart" />

            <EditText
                android:id="@+id/loginView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:autofillHints="username"
                android:hint="@string/prompt_login"
                android:inputType="text"
                android:maxLines="1"
                android:minHeight="48dp"
                android:visibility="gone" />

            <EditText
                android:id="@+id/passwordView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:autofillHints="password"
                android:hint="@string/prompt_password"
                android:inputType="textPassword"
                android:maxLines="1"
                android:minHeight="48dp"
                android:visibility="gone" />

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

        </LinearLayout>
    </LinearLayout>

</LinearLayout>
