<?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"
    android:paddingStart="6dp"
    android:paddingTop="12dp"
    android:paddingEnd="6dp"
    android:paddingBottom="0dp"
    android:scrollbarStyle="outsideOverlay"
    tools:context="eu.faircode.email.ActivitySetup">

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

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvEncryptMethod"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginEnd="48dp"
            android:text="@string/title_advanced_encrypt_method"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?android:attr/textColorPrimary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <Spinner
            android:id="@+id/spEncryptMethod"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:entries="@array/encryptMethod"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvEncryptMethod" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/swSign"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_sign_default"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/spEncryptMethod"
            app:switchPadding="12dp" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/swEncrypt"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_encrypt_default"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/swSign"
            app:switchPadding="12dp" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/swAutoDecrypt"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_auto_decrypt"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/swEncrypt"
            app:switchPadding="12dp" />


        <!-- PGP -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCaptionPgp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:layout_marginEnd="48dp"
            android:text="@string/title_advanced_caption_pgp"
            android:textAppearance="@style/TextAppearance.AppCompat.Large"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/swAutoDecrypt" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvOpenPgp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:layout_marginEnd="48dp"
            android:text="@string/title_advanced_openpgp"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            android:textColor="?android:attr/textColorPrimary"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCaptionPgp" />

        <Spinner
            android:id="@+id/spOpenPgp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvOpenPgp" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/swAutocrypt"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:checked="true"
            android:text="@string/title_advanced_autocrypt"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/spOpenPgp"
            app:switchPadding="12dp" />

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/swAutocryptMutual"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:checked="true"
            android:text="@string/title_advanced_autocrypt_mutual"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/swAutocrypt"
            app:switchPadding="12dp" />

        <!-- S/MIME -->

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvCaptionSmime"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="24dp"
            android:layout_marginEnd="48dp"
            android:text="@string/title_advanced_caption_smime"
            android:textAppearance="@style/TextAppearance.AppCompat.Large"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/swAutocryptMutual" />

        <Button
            android:id="@+id/btnManageCertificates"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:minWidth="0dp"
            android:minHeight="0dp"
            android:text="@string/title_advanced_manage_certificates"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/tvCaptionSmime" />

        <Button
            android:id="@+id/btnImportKey"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:minWidth="0dp"
            android:minHeight="0dp"
            android:text="@string/title_advanced_import_key"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnManageCertificates" />

        <Button
            android:id="@+id/btnManageKeys"
            style="?android:attr/buttonStyleSmall"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:minWidth="0dp"
            android:minHeight="0dp"
            android:text="@string/title_advanced_manage_keys"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnImportKey" />

        <eu.faircode.email.FixedTextView
            android:id="@+id/tvKeySize"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginTop="12dp"
            android:text="@string/title_advanced_aes_key_size"
            android:textAppearance="@style/TextAppearance.AppCompat.Small"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/btnManageKeys" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
