<?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_height="fill_parent"
    android:layout_width="fill_parent">

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:padding="6dip"
        android:fadingEdge="none"
        android:scrollbarStyle="outsideInset">

        <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical">

            <TextView
                android:text="@string/account_setup_outgoing_smtp_server_label"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary" />

            <EditText
                android:id="@+id/account_server"
                android:singleLine="true"
                android:inputType="textUri"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:contentDescription="@string/account_setup_outgoing_smtp_server_label" />

            <TextView
                android:text="@string/account_setup_outgoing_security_label"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary" />

            <Spinner
                android:id="@+id/account_security_type"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:contentDescription="@string/account_setup_outgoing_security_label" />

            <TextView
                android:text="@string/account_setup_outgoing_port_label"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary" />

            <EditText
                android:id="@+id/account_port"
                android:singleLine="true"
                android:inputType="number"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:contentDescription="@string/account_setup_outgoing_port_label" />

            <CheckBox
                android:id="@+id/account_require_login"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:text="@string/account_setup_outgoing_require_login_label" />

            <LinearLayout
                android:id="@+id/account_require_login_settings"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:orientation="vertical"
                android:visibility="gone">

                <TextView
                    android:text="@string/account_setup_outgoing_username_label"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary" />

                <EditText
                    android:id="@+id/account_username"
                    android:singleLine="true"
                    android:inputType="textEmailAddress"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:contentDescription="@string/account_setup_outgoing_username_label" />

                <TextView
                    android:text="@string/account_setup_outgoing_authentication_label"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary" />

                <Spinner
                    android:id="@+id/account_auth_type"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:contentDescription="@string/account_setup_outgoing_authentication_label" />

                <TextView
                    android:id="@+id/account_password_label"
                    android:text="@string/account_setup_outgoing_password_label"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary" />

                <EditText
                    android:id="@+id/account_password"
                    android:singleLine="true"
                    android:inputType="textPassword"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:contentDescription="@string/account_setup_outgoing_password_label" />

                <TextView
                    android:id="@+id/account_client_certificate_label"
                    android:text="@string/account_setup_incoming_client_certificate_label"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:textAppearance="?android:attr/textAppearanceSmall"
                    android:textColor="?android:attr/textColorPrimary"
                    android:visibility="gone" />

                <com.fsck.k9.view.ClientCertificateSpinner
                    android:id="@+id/account_client_certificate_spinner"
                    android:layout_height="wrap_content"
                    android:layout_width="fill_parent"
                    android:visibility="gone" />
            </LinearLayout>

            <View
                android:layout_width="fill_parent"
                android:layout_height="0dip"
                android:layout_weight="1" />
        </LinearLayout>
    </ScrollView>

    <include layout="@layout/wizard_next" />

</LinearLayout>
