<?xml version="1.0" encoding="utf-8"?>
<eu.faircode.email.ScrollViewEx 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/scroll"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="12dp"
    android:scrollbarStyle="outsideOverlay"
    tools:context="eu.faircode.email.ActivitySetup">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:descendantFocusability="beforeDescendants"
        android:focusable="true"
        android:focusableInTouchMode="true">

        <!--- linked account -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvAccount"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_account_linked"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Spinner
            android:id="@+id/spAccount"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvAccount" />

        <!-- name -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvName"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:labelFor="@+id/etName"
            android:text="@string/title_identity_name"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/spAccount" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etName"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="name"
            android:inputType="textPersonName|textCapWords"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvName" />

        <!-- email -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvEmail"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:labelFor="@+id/etEmail"
            android:text="@string/title_identity_email"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etName" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etEmail"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="emailAddress"
            android:inputType="textEmailAddress"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvEmail" />

        <!-- display name -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvDisplay"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_display_name"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etEmail" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etDisplay"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="name"
            android:hint="@string/title_optional"
            android:inputType="textPersonName"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvDisplay" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvColor"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_color"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etDisplay" />

        <eu.faircode.email.ViewButtonColor
            android:id="@+id/btnColor"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:tag="disable"
            android:text="@string/title_select"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvColor" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvColorHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/title_identity_color_hint"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnColor" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvColorPro"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/title_pro_feature"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?android:attr/textColorLink"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvColorHint" />

        <Button
            android:id="@+id/btnSignature"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:tag="disable"
            android:text="@string/title_edit_signature"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvColorPro" />

        <Button
            android:id="@+id/btnAdvanced"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_setup_advanced"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnSignature" />

        <!--- provider -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvProvider"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_provider"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnAdvanced" />

        <Spinner
            android:id="@+id/spProvider"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvProvider" />

        <!-- SMTP -->

        <!-- auto config -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvDomain"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_domain"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/spProvider" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvDomainHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_optional"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvDomain" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etDomain"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="domain.tld"
            android:inputType="textUri"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvDomainHint" />

        <Button
            android:id="@+id/btnAutoConfig"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:tag="disable"
            android:text="@string/title_autoconfig"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etDomain" />

        <eu.faircode.email.ContentLoadingProgressBar
            android:id="@+id/pbAutoConfig"
            style="@style/Base.Widget.AppCompat.ProgressBar"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="12dp"
            android:indeterminate="true"
            app:layout_constraintBottom_toBottomOf="@id/btnAutoConfig"
            app:layout_constraintStart_toEndOf="@id/btnAutoConfig"
            app:layout_constraintTop_toTopOf="@id/btnAutoConfig" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvSmtp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_smtp"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnAutoConfig" />

        <!-- host -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvHost"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_host"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvSmtp" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etHost"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="smtp.domain.tld"
            android:inputType="textUri"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvHost" />

        <!-- SSL/STARTTLS -->

        <RadioGroup
            android:id="@+id/rgEncryption"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:orientation="horizontal"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etHost">

            <RadioButton
                android:id="@+id/radio_ssl"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/title_ssl" />

            <RadioButton
                android:id="@+id/radio_starttls"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="12dp"
                android:text="@string/title_starttls" />
        </RadioGroup>

        <CheckBox
            android:id="@+id/cbInsecure"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_allow_insecure"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/rgEncryption" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvInsecureRemark"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/title_insecure_remark"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbInsecure" />

        <!-- port -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvPort"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_port"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvInsecureRemark" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etPort"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="465"
            android:inputType="number"
            android:maxLength="5"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvPort" />

        <!-- username -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvUser"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:labelFor="@+id/etUser"
            android:text="@string/title_user"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etPort" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etUser"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="username"
            android:inputType="text"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvUser" />

        <!-- password -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvPassword"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_password"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etUser" />

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

            <com.google.android.material.textfield.TextInputEditText
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:autofillHints="password"
                android:inputType="textPassword"
                android:textAppearance="@style/TextAppearance.AppCompat.Medium" />
        </com.google.android.material.textfield.TextInputLayout>

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCharacters"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_setup_password_chars"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?attr/colorWarning"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tilPassword" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCaseSensitiveHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dp"
            android:text="@string/title_case_sensitive"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCharacters" />

        <Button
            android:id="@+id/btnCertificate"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:tag="disable"
            android:text="@string/title_client_certificate"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCaseSensitiveHint" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCertificate"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:text="@string/title_optional"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintBottom_toBottomOf="@+id/btnCertificate"
            app:layout_constraintStart_toEndOf="@id/btnCertificate"
            app:layout_constraintTop_toTopOf="@id/btnCertificate" />

        <Button
            android:id="@+id/btnOAuth"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:tag="disable"
            android:text="@string/title_setup_authentication"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnCertificate" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvRealm"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_realm"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnOAuth" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etRealm"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="@string/title_optional"
            android:inputType="text"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvRealm" />

        <CheckBox
            android:id="@+id/cbUseIp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_use_ip"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etRealm" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvUseIpHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_identity_use_ip_hint"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbUseIp" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvEhlo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_ehlo"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvUseIpHint" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etEhlo"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="name"
            android:hint="@string/title_optional"
            android:inputType="text"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvEhlo" />

        <CheckBox
            android:id="@+id/cbSynchronize"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_enabled"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etEhlo" />

        <CheckBox
            android:id="@+id/cbPrimary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_primary_identity"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbSynchronize" />

        <CheckBox
            android:id="@+id/cbSelf"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:checked="true"
            android:text="@string/title_self_identity"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbPrimary" />

        <CheckBox
            android:id="@+id/cbSenderExtra"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_sender"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbSelf" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvSenderExtra"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_sender_regex"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbSenderExtra" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etSenderExtra"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:hint="@string/title_optional"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvSenderExtra" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvSenderExtraHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_advanced_sender_hint"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etSenderExtra" />

        <!-- reply to -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvReplyTo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_identity_reply_to"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvSenderExtraHint" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etReplyTo"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="emailAddress"
            android:hint="@string/title_optional"
            android:inputType="textEmailAddress"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_cc"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etReplyTo" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etCc"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="emailAddress"
            android:hint="@string/title_optional"
            android:inputType="textEmailAddress"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCc" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCcHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_advanced_bcc_hint"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etCc" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvBcc"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_bcc"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCcHint" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etBcc"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:autofillHints="emailAddress"
            android:hint="@string/title_optional"
            android:inputType="textEmailAddress"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvBcc" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvBccHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_advanced_bcc_hint"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etBcc" />

        <CheckBox
            android:id="@+id/cbUnicode"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_identity_unicode"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvBccHint" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvUnicodeHint"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/title_identity_unicode_remark"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textStyle="italic"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbUnicode" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvMaxSize"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_identity_max_size"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvUnicodeHint" />

        <eu.faircode.email.EditTextPlain
            android:id="@+id/etMaxSize"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:inputType="number"
            android:maxLength="5"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvMaxSize" />

        <Button
            android:id="@+id/btnSave"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:tag="disable"
            android:text="@string/title_save"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/etMaxSize" />

        <eu.faircode.email.ContentLoadingProgressBar
            android:id="@+id/pbSave"
            style="@style/Base.Widget.AppCompat.ProgressBar"
            android:layout_width="24dp"
            android:layout_height="24dp"
            android:layout_marginStart="12dp"
            android:indeterminate="true"
            app:layout_constraintBottom_toBottomOf="@id/btnSave"
            app:layout_constraintStart_toEndOf="@id/btnSave"
            app:layout_constraintTop_toTopOf="@id/btnSave" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvErrorTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_setup_error"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnSave" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvError"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:autoLink="web"
            android:text="error message"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            android:textColor="?attr/colorWarning"
            android:textIsSelectable="true"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvErrorTitle" />

        <CheckBox
            android:id="@+id/cbTrust"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_trust"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvError" />

        <Button
            android:id="@+id/btnSupport"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:backgroundTint="?attr/colorInfoBackground"
            android:text="@string/menu_faq"
            android:textColor="?attr/colorInfoForeground"
            android:textStyle="bold"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbTrust" />

        <Button
            android:id="@+id/btnHelp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:backgroundTint="?attr/colorInfoBackground"
            android:text="@string/title_setup_help"
            android:textColor="?attr/colorInfoForeground"
            android:textStyle="bold"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toBottomOf="@id/cbTrust" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvInstructions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="provider instructions"
            android:textAppearance="@style/TextAppearance.AppCompat.Medium"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnHelp" />

        <eu.faircode.email.ContentLoadingProgressBar
            android:id="@+id/pbWait"
            style="@style/Base.Widget.AppCompat.ProgressBar"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:indeterminate="true"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/grpAuthorize"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:constraint_referenced_ids="
                tvName,etName,tvEmail,etEmail,tvDisplay,etDisplay,
                tvColor,btnColor,tvColorHint,tvColorPro,
                btnSignature,
                btnAdvanced,btnSave" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/grpAdvanced"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:constraint_referenced_ids="
                tvProvider,spProvider,
                tvDomain,tvDomainHint,etDomain,btnAutoConfig,
                tvSmtp,tvHost,etHost,rgEncryption,cbInsecure,tvInsecureRemark,tvPort,etPort,
                tvUser,etUser,tvPassword,tilPassword,tvCaseSensitiveHint,btnCertificate,tvCertificate,btnOAuth,
                tvRealm,etRealm,
                cbUseIp,tvUseIpHint,tvEhlo,etEhlo,
                cbSynchronize,cbPrimary,cbSelf,
                cbSenderExtra,tvSenderExtra,etSenderExtra,tvSenderExtraHint,
                tvReplyTo,etReplyTo,tvCc,etCc,tvCcHint,tvBcc,etBcc,tvBccHint,
                cbUnicode,tvUnicodeHint,tvMaxSize,etMaxSize" />

        <androidx.constraintlayout.widget.Group
            android:id="@+id/grpError"
            android:layout_width="0dp"
            android:layout_height="0dp"
            app:constraint_referenced_ids="tvErrorTitle,tvError" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</eu.faircode.email.ScrollViewEx>
