<?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">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/set_name" />

            <EditText
                android:id="@+id/editTextEmailName"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:importantForAutofill="no"
                android:inputType="text"
                android:singleLine="true"
                tools:ignore="LabelFor,TextFields" />

            <Switch
                android:id="@+id/switchEmailEnable"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:textSize="14sp"
                tools:ignore="UseSwitchCompatOrMaterialXml" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:text="@string/account"
            android:textColor="@color/colorBlueGreyDark"
            android:textSize="14sp"
            tools:ignore="HardcodedText" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/email_account" />

            <EditText
                android:id="@+id/editTextEmailFromAdd"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:autofillHints=""
                android:ems="14"
                android:inputType="textEmailAddress"
                android:maxLines="1"
                android:text=""
                tools:ignore="LabelFor" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/email_password" />

            <com.idormy.sms.forwarder.view.ClearEditText
                android:id="@+id/editTextEmailPsw"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:background="@drawable/line_bg_white_only_bottom_d8"
                app:showEye="true"
                app:textColor="@color/tv_black_333333"
                app:textColorHint="@color/tv_gray_999999"
                app:textSize="15sp" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/email_nickname" />

            <EditText
                android:id="@+id/editTextEmailNickname"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:autofillHints=""
                android:ems="14"
                android:inputType="text"
                android:maxLines="1"
                android:text=""
                tools:ignore="LabelFor,TextFields" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:text="@string/servers"
            android:textColor="@color/colorBlueGreyDark"
            android:textSize="14sp"
            tools:ignore="HardcodedText" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginTop="5dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal"
            android:visibility="gone">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:paddingTop="5dp"
                android:text="@string/email_protocol" />

            <RadioGroup
                android:id="@+id/radioGroupEmailProtocol"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:orientation="horizontal">

                <RadioButton
                    android:id="@+id/radioEmailProtocolSmtp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:checked="true"
                    android:text="@string/email_smtp" />

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

            </RadioGroup>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/email_host" />

            <EditText
                android:id="@+id/editTextEmailHost"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:autofillHints=""
                android:ems="14"
                android:inputType="text"
                android:maxLines="1"
                android:text=""
                tools:ignore="LabelFor,TextFields" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginEnd="10dp"
            android:orientation="horizontal">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/smtp_port" />

            <EditText
                android:id="@+id/editTextEmailPort"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginStart="3dp"
                android:layout_weight="1"
                android:digits="0123456789"
                android:importantForAutofill="no"
                android:inputType="number"
                android:maxLength="5"
                android:singleLine="true"
                tools:ignore="LabelFor,TextFields" />

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/enable_ssl" />

            <Switch
                android:id="@+id/switchEmailSSl"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                tools:ignore="UseSwitchCompatOrMaterialXml" />
        </LinearLayout>

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="10dp"
            android:text="@string/email_settings"
            android:textColor="@color/colorBlueGreyDark"
            android:textSize="14sp"
            tools:ignore="HardcodedText" />

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="5dp"
            android:layout_marginEnd="10dp"
            android:background="@android:color/white"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/email_to" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="5dp"
                    android:text="@string/email_to_tips"
                    android:textSize="11sp" />
            </LinearLayout>

            <EditText
                android:id="@+id/editTextEmailToAdd"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:autofillHints=""
                android:gravity="start|top"
                android:inputType="text"
                android:minLines="1"
                android:text=""
                tools:ignore="LabelFor,TextFields" />
        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_sms_template"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginStart="10dp"
            android:layout_marginTop="5dp"
            android:layout_marginEnd="10dp"
            android:background="@android:color/white"
            android:gravity="center_vertical"
            android:orientation="vertical">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="@string/email_title" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="5dp"
                    android:text="@string/custom_templates_tips"
                    android:textSize="11sp" />
            </LinearLayout>

            <EditText
                android:id="@+id/editTextEmailTitle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:autofillHints=""
                android:gravity="start|top"
                android:inputType="text"
                android:minLines="1"
                android:text=""
                tools:ignore="LabelFor,TextFields" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:orientation="horizontal">

                <Button
                    android:id="@+id/bt_insert_sender"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginBottom="5dp"
                    android:layout_weight="1"
                    android:background="@color/colorBlueGrey"
                    android:text="@string/insert_sender"
                    tools:ignore="ButtonStyle,NestedWeights" />

                <Button
                    android:id="@+id/bt_insert_extra"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginBottom="5dp"
                    android:layout_weight="1"
                    android:background="@color/colorBlueGrey"
                    android:text="@string/insert_extra"
                    tools:ignore="ButtonStyle,NestedWeights" />

                <Button
                    android:id="@+id/bt_insert_time"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginBottom="5dp"
                    android:layout_weight="1"
                    android:background="@color/colorBlueGrey"
                    android:text="@string/insert_time"
                    tools:ignore="ButtonStyle,NestedWeights" />

                <Button
                    android:id="@+id/bt_insert_device_name"
                    android:layout_width="match_parent"
                    android:layout_height="25dp"
                    android:layout_marginStart="5dp"
                    android:layout_marginTop="5dp"
                    android:layout_marginBottom="5dp"
                    android:layout_weight="1"
                    android:background="@color/colorBlueGrey"
                    android:text="@string/insert_device_name"
                    tools:ignore="ButtonStyle,NestedWeights" />

            </LinearLayout>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="10dp"
            android:orientation="horizontal">

            <Button
                android:id="@+id/buttonEmailTest"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:layout_weight="1"
                android:text="@string/test"
                tools:ignore="ButtonStyle,NestedWeights" />

            <Button
                android:id="@+id/buttonEmailDel"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:layout_weight="1"
                android:text="@string/del"
                tools:ignore="ButtonStyle,NestedWeights" />

            <Button
                android:id="@+id/buttonEmailOk"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/ok"
                tools:ignore="ButtonStyle,NestedWeights" />

        </LinearLayout>

    </LinearLayout>
</ScrollView>