<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:padding="16dp">

        <TextView
            android:id="@+id/passwordPromptIntro"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            tools:text="To be able to use the account &quot;Test&quot; you need to provide the server passwords."
            android:textAppearance="?android:attr/textAppearanceMedium"
            android:textColor="?android:attr/textColorPrimary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/incomingServerPasswordLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/passwordPromptIntro"
            app:passwordToggleEnabled="true">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/incomingServerPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/settings_import_incoming_server_password_hint"
                android:inputType="textPassword" />

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

        <TextView
            android:id="@+id/incomingServerName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="Server: imap.server.example"
            android:textAppearance="?android:attr/textAppearanceSmall"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/incomingServerPasswordLayout" />

        <CheckBox
            android:id="@+id/useSamePasswordCheckbox"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:checked="true"
            android:text="@string/settings_import_use_same_password_for_outgoing_server"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/incomingServerName" />

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/outgoingServerPasswordLayout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/useSamePasswordCheckbox"
            app:passwordToggleEnabled="true">

            <com.google.android.material.textfield.TextInputEditText
                android:id="@+id/outgoingServerPassword"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:hint="@string/settings_import_outgoing_server_password_hint"
                android:inputType="textPassword" />

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

        <TextView
            android:id="@+id/outgoingServerName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            tools:text="Server: smtp.server.example"
            android:textAppearance="?android:attr/textAppearanceSmall"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/outgoingServerPasswordLayout" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/incomingServerGroup"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:constraint_referenced_ids="incomingServerPasswordLayout,incomingServerName" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/outgoingServerGroup"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:constraint_referenced_ids="outgoingServerPasswordLayout,outgoingServerName" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
