<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    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="5dp"
            android:layout_marginTop="5dp"
            android:orientation="vertical"
            android:visibility="gone">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/match_sim_slot"
                android:textStyle="bold" />

            <RadioGroup
                android:id="@+id/radioGroupSimSlot"
                style="@style/rg_style"
                android:orientation="horizontal">

                <RadioButton
                    android:id="@+id/btnSimSlotAll"
                    style="@style/rg_rb_style"
                    android:checked="true"
                    android:text="@string/all" />

                <RadioButton
                    android:id="@+id/btnSimSlot1"
                    style="@style/rg_rb_style"
                    android:text="@string/sim1" />

                <RadioButton
                    android:id="@+id/btnSimSlot2"
                    style="@style/rg_rb_style"
                    android:text="@string/sim2" />
            </RadioGroup>

        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="5dp"
            android:layout_marginTop="5dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/match_field"
                android:textStyle="bold" />

            <RadioGroup
                android:id="@+id/radioGroupRuleFiled"
                style="@style/rg_style"
                android:orientation="horizontal">

                <RadioButton
                    android:id="@+id/btnTranspondAll"
                    style="@style/rg_rb_style"
                    android:checked="true"
                    android:text="@string/all" />

                <RadioButton
                    android:id="@+id/btnPhone"
                    style="@style/rg_rb_style"
                    android:text="@string/phone_number"
                    android:visibility="gone" />

                <RadioButton
                    android:id="@+id/btnContent"
                    style="@style/rg_rb_style"
                    android:text="@string/sms_content"
                    android:visibility="gone" />

                <RadioButton
                    android:id="@+id/btnPackageName"
                    style="@style/rg_rb_style"
                    android:text="@string/package_name" />

                <RadioButton
                    android:id="@+id/btnInformContent"
                    style="@style/rg_rb_style"
                    android:text="@string/inform_content" />

                <RadioButton
                    android:id="@+id/btnMultiMatch"
                    style="@style/rg_rb_style"
                    android:text="@string/multiple_matches" />
            </RadioGroup>

        </LinearLayout>

        <LinearLayout
            android:id="@+id/matchTypeLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="5dp"
            android:layout_marginTop="5dp"
            android:layout_marginEnd="5dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/match_type"
                android:textStyle="bold" />

            <RadioGroup
                android:id="@+id/radioGroupRuleCheck"
                style="@style/rg_style"
                android:orientation="horizontal">

                <RadioButton
                    android:id="@+id/btnIs"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_is" />

                <RadioButton
                    android:id="@+id/btnContain"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_contain" />

                <RadioButton
                    android:id="@+id/btnNotContain"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_not_contain" />
            </RadioGroup>

            <RadioGroup
                android:id="@+id/radioGroupRuleCheck2"
                style="@style/rg_style"
                android:orientation="horizontal">

                <RadioButton
                    android:id="@+id/btnStartWith"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_start_with" />

                <RadioButton
                    android:id="@+id/btnEndWith"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_end_with" />

                <RadioButton
                    android:id="@+id/btnRegex"
                    style="@style/rg_rb_style"
                    android:text="@string/btn_regex" />

            </RadioGroup>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/matchValueLayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="5dp"
            android:layout_marginTop="5dp"

            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:text="@string/match_value"
                android:textStyle="bold" />

            <EditText
                android:id="@+id/editTextRuleValue"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:autofillHints=""
                android:ems="14"
                android:gravity="start|top"
                android:inputType="textMultiLine"
                android:minLines="1"
                android:text=""
                tools:ignore="LabelFor" />

            <TextView
                android:id="@+id/tv_mu_rule_tips"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="3dp"
                android:text="@string/mu_rule_tips2" />
        </LinearLayout>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginStart="10dp"
            android:layout_marginTop="5dp"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/select_sender"
                android:textStyle="bold" />

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

                <Button
                    android:id="@+id/btSetRuleSender"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:minWidth="0dp"
                    android:minHeight="0dp"
                    android:text="@string/select" />

                <TextView
                    android:id="@+id/ruleSenderTv"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="5dp"
                    android:text="" />
            </LinearLayout>

        </LinearLayout>

        <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="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:text="@string/enable_custom_templates"
                android:textStyle="bold" />

            <Switch
                android:id="@+id/switch_sms_template"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:gravity="end"
                android:textSize="18sp"
                tools:ignore="UseSwitchCompatOrMaterialXml" />

        </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"
            android:visibility="gone">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/enable_custom_templates_tips"
                android:textSize="11sp" />

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

            <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/colorPrimary"
                    android:text="@string/insert_sender"
                    android:visibility="gone"
                    tools:ignore="ButtonStyle,NestedWeights" />

                <Button
                    android:id="@+id/bt_insert_content"
                    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/colorPrimary"
                    android:text="@string/insert_content"
                    android:visibility="gone"
                    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/colorPrimary"
                    android:text="@string/insert_extra"
                    android:visibility="gone"
                    tools:ignore="ButtonStyle,NestedWeights" />

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

                <Button
                    android:id="@+id/bt_insert_content_app"
                    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/colorPrimary"
                    android:text="@string/insert_content_app"
                    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/colorPrimary"
                    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/colorPrimary"
                    android:text="@string/insert_device_name"
                    tools:ignore="ButtonStyle,NestedWeights" />

            </LinearLayout>

        </LinearLayout>

        <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="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:text="@string/enable_regex_replace"
                android:textStyle="bold" />

            <Switch
                android:id="@+id/switch_regex_replace"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:gravity="end"
                android:textSize="18sp"
                tools:ignore="UseSwitchCompatOrMaterialXml" />

        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_regex_replace"
            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"
            android:visibility="gone">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/enable_regex_replace_tips"
                android:textSize="11sp" />

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

        </LinearLayout>

        <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="horizontal">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:text="@string/switch_rule_status"
                android:textStyle="bold" />

            <Switch
                android:id="@+id/switch_rule_status"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="3"
                android:gravity="end"
                android:textSize="18sp"
                tools:ignore="UseSwitchCompatOrMaterialXml" />

        </LinearLayout>

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

            <Button
                android:id="@+id/buttonRuleTest"
                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/buttonRuleDel"
                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/buttonRuleOk"
                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>