<!--
  ~ Copyright (c) 2015. Ncomz. All Rights Reserved
  -->

<LinearLayout
    android:id="@+id/llPageRoot"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/color_body_01"
    android:fitsSystemWindows="true"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:orientation="vertical">

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

  <com.ntels.kneet.v3.common.widget.CustomScrollView
      android:id="@+id/svBody"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:fadingEdge="none">

    <LinearLayout
        android:id="@+id/llSvbody"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:paddingBottom="40dp">

      <LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/color_bg_02"
          android:gravity="center_vertical"
          android:orientation="horizontal"
          android:paddingBottom="10dp"
          android:paddingLeft="15dp"
          android:paddingRight="15dp"
          android:paddingTop="10dp">

        <EditText
            android:id="@+id/edtRulesName"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:layout_weight="1"
            android:background="@drawable/d_img_input_round_bg"
            android:gravity="left|center_vertical"
            android:hint="@string/layout_rules_edit_02"
            android:imeOptions="actionDone"
            android:includeFontPadding="false"
            android:inputType="textEmailAddress"
            android:maxLength="40"
            android:minHeight="35dp"
            android:paddingLeft="15dp"
            android:paddingRight="15dp"
            android:singleLine="true"
            android:textColor="@color/color_text_01"
            android:textColorHint="@color/color_text_03"
            android:textSize="@dimen/size_font_01">

        </EditText>
      </LinearLayout>

      <LinearLayout
          android:id="@+id/llTrigger"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingTop="15dp">

        <LinearLayout
            android:id="@+id/llTriggerTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingBottom="13dp"
            android:paddingRight="15dp"
            android:paddingTop="8dp">

          <ImageView
              android:layout_width="15dp"
              android:layout_height="3dp"
              android:background="@drawable/common_bullet_line"/>

          <TextView
              android:id="@+id/tvTriggerTitle"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="7dp"
              android:layout_marginLeft="10dp"
              android:layout_marginTop="7dp"
              android:layout_weight="1"
              android:includeFontPadding="false"
              android:text="@string/layout_rules_edit_03"
              android:textColor="@color/color_text_01"
              android:textSize="@dimen/size_font_05"
              android:textStyle="bold"
          />

          <ImageView
              android:id="@+id/ivTriggerAdd"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:layout_marginLeft="20dp"
              android:background="@drawable/d_common_list_btn_add"/>
        </LinearLayout>


        <LinearLayout
            android:id="@+id/llTriggerBody"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

        </LinearLayout>

        <View style="@style/width_section"/>
      </LinearLayout>


      <LinearLayout
          android:id="@+id/llAction"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingTop="15dp">


        <LinearLayout
            android:id="@+id/llActionTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingBottom="13dp"
            android:paddingRight="15dp"
            android:paddingTop="8dp">

          <ImageView
              android:layout_width="15dp"
              android:layout_height="3dp"
              android:background="@drawable/common_bullet_line"/>

          <TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="7dp"
              android:layout_marginLeft="10dp"
              android:layout_marginTop="7dp"
              android:layout_weight="1"
              android:includeFontPadding="false"
              android:text="@string/layout_rules_edit_04"
              android:textColor="@color/color_text_01"
              android:textSize="@dimen/size_font_05"
              android:textStyle="bold"
          />

          <ImageView
              android:id="@+id/ivActionAdd"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:layout_marginLeft="20dp"
              android:background="@drawable/d_common_list_btn_add"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/llActionBody"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
        </LinearLayout>

        <View style="@style/width_section"/>

      </LinearLayout>


      <LinearLayout
          android:id="@+id/llAlram"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"
          android:paddingTop="15dp">

        <LinearLayout
            android:id="@+id/llAlramTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingBottom="13dp"
            android:paddingRight="15dp"
            android:paddingTop="8dp">

          <ImageView
              android:layout_width="15dp"
              android:layout_height="3dp"
              android:background="@drawable/common_bullet_line"/>

          <TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="7dp"
              android:layout_marginLeft="10dp"
              android:layout_marginTop="7dp"
              android:layout_weight="1"
              android:includeFontPadding="false"
              android:text="@string/layout_rules_edit_05"
              android:textColor="@color/color_text_01"
              android:textSize="@dimen/size_font_05"
              android:textStyle="bold"
          />

          <ImageView
              android:id="@+id/ivAlramAdd"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:layout_marginLeft="20dp"
              android:background="@drawable/d_common_list_btn_add"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/llAlramBody"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
        </LinearLayout>

        <View style="@style/width_Divider_01"/>

        <View style="@style/width_section"/>
      </LinearLayout>


      <LinearLayout
          android:id="@+id/llCondition"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:background="@drawable/color_bg_01"
          android:orientation="vertical"
          android:paddingBottom="40dp"
          android:paddingTop="20dp"
          android:visibility="visible">

        <LinearLayout
            android:id="@+id/llConditionTitle"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center_vertical"
            android:paddingBottom="13dp"
            android:paddingTop="13dp">

          <ImageView
              android:layout_width="10dp"
              android:layout_height="10dp"
              android:layout_marginLeft="15dp"
              android:layout_marginRight="5dp"
              android:background="@drawable/common_bullet_circle_black"/>

          <TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_marginBottom="7dp"
              android:layout_marginTop="7dp"
              android:includeFontPadding="false"
              android:text="@string/layout_rules_edit_06"
              android:textColor="@color/color_text_01"
              android:textSize="@dimen/size_font_05"
              android:textStyle="bold"
          />


          <ImageView
              android:layout_width="wrap_content"
              android:layout_height="1dp"
              android:layout_marginLeft="10dp"
              android:layout_weight="1"
              android:background="@drawable/color_line_02"/>

          <ImageView
              android:id="@+id/ivConditionChk"
              android:layout_width="30dp"
              android:layout_height="30dp"
              android:layout_marginLeft="20dp"
              android:layout_marginRight="15dp"
              android:background="@drawable/d_common_checkbox"
              android:duplicateParentState="true"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/llConditionBody"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:visibility="gone">

          <LinearLayout
              android:id="@+id/llConditionBody1Title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              android:paddingBottom="13dp"
              android:paddingLeft="30dp"
              android:paddingRight="15dp"
              android:paddingTop="13dp">

            <TextView
                android:id="@+id/tvAddCondition1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="7dp"
                android:layout_marginTop="7dp"
                android:layout_weight="1"
                android:includeFontPadding="false"
                android:text="@string/layout_rules_edit_07"
                android:textColor="@color/color_text_01"
                android:textSize="@dimen/size_font_02"
                android:textStyle="bold"
            />

            <ImageView
                android:id="@+id/ivConditionBody1TitleAdd"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginLeft="20dp"
                android:background="@drawable/d_common_list_btn_add"/>
          </LinearLayout>

          <LinearLayout
              android:id="@+id/llConditionBody1"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:orientation="vertical">
          </LinearLayout>

          <LinearLayout
              android:id="@+id/llConditionBody2Title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              android:paddingBottom="13dp"
              android:paddingLeft="30dp"
              android:paddingRight="15dp"
              android:paddingTop="13dp">

            <TextView
                android:id="@+id/tvAddCondition2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="7dp"
                android:layout_marginTop="7dp"
                android:layout_weight="1"
                android:includeFontPadding="false"
                android:text="@string/layout_rules_edit_08"
                android:textColor="@color/color_text_01"
                android:textSize="@dimen/size_font_02"
                android:textStyle="bold"
            />

            <ImageView
                android:id="@+id/ivConditionBody2TitleAdd"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginLeft="20dp"
                android:background="@drawable/d_common_list_btn_add"/>
          </LinearLayout>

          <LinearLayout
              android:id="@+id/llConditionBody2"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:orientation="vertical">
          </LinearLayout>

          <LinearLayout
              android:id="@+id/llConditionBody3Title"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:gravity="center_vertical"
              android:paddingBottom="13dp"
              android:paddingLeft="30dp"
              android:paddingRight="15dp"
              android:paddingTop="13dp">

            <TextView
                android:id="@+id/tvAddCondition3"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginBottom="7dp"
                android:layout_marginTop="7dp"
                android:layout_weight="1"
                android:includeFontPadding="false"
                android:text="@string/layout_rules_edit_09"
                android:textColor="@color/color_text_01"
                android:textSize="@dimen/size_font_02"
                android:textStyle="bold"
            />

            <ImageView
                android:id="@+id/ivConditionBody3TitleAdd"
                android:layout_width="30dp"
                android:layout_height="30dp"
                android:layout_marginLeft="20dp"
                android:background="@drawable/d_common_list_btn_add"/>
          </LinearLayout>

          <LinearLayout
              android:id="@+id/llConditionBody3"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"
              android:orientation="vertical">
          </LinearLayout>
        </LinearLayout>

      </LinearLayout>

    </LinearLayout>
  </com.ntels.kneet.v3.common.widget.CustomScrollView>

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

    <View
        style="@style/width_Divider_02"/>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_gravity="center_horizontal"
        android:background="@drawable/color_bg_01"
        android:gravity="center">

      <LinearLayout
          android:id="@+id/llBtn1"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:gravity="center">

        <TextView
            android:id="@+id/tvBtn1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:includeFontPadding="false"
            android:text="@string/layout_finish"
            android:textColor="@drawable/d_font_color_font_01_color_font_02"
            android:textSize="@dimen/size_font_05"
            android:textStyle="bold"/>
      </LinearLayout>

      <View
          android:id="@+id/vLine"
          style="@style/height_Divider_02"/>

      <LinearLayout
          android:id="@+id/llBtn2"
          android:layout_width="0dp"
          android:layout_height="match_parent"
          android:layout_weight="1"
          android:gravity="center">

        <TextView
            android:id="@+id/tvBtn2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="@null"
            android:includeFontPadding="false"
            android:text="@string/layout_cancel"
            android:textColor="@drawable/d_font_color_font_01_color_font_02"
            android:textSize="@dimen/size_font_05"
            android:textStyle="bold"/>
      </LinearLayout>
    </LinearLayout>
  </LinearLayout>

</LinearLayout>