<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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:orientation="vertical"
    tools:context=".ui.activity.device.fences.AddAndEditFencesZoneBaseActivity">

    <include
        android:id="@+id/add_edit_fences_zone_top_bar"
        layout="@layout/layout_top_bar" />

    <RelativeLayout
        android:id="@+id/rl_add_edit_fences_zone_map_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@id/add_edit_fences_zone_top_bar">

        <androidx.fragment.app.FragmentContainerView
            android:id="@+id/fc_fences_map_fragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />


        <com.abbidot.tracker.widget.FencesCircleView
            android:id="@+id/fences_zone_circle_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone"
            app:fences_circle_dashed_color="@color/select_color"
            app:fences_circle_fill_bg_color="@color/select_color4" />

        <com.abbidot.tracker.widget.FencesRectView
            android:id="@+id/fences_zone_rect_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" />

        <com.abbidot.tracker.widget.FencesPolygonView
            android:id="@+id/fences_zone_polygon_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:visibility="gone" />

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/iv_fences_zone_refresh_btn"
            style="@style/map_image_yellow_btn_style"
            android:layout_alignParentEnd="true"
            android:layout_alignParentBottom="true"
            android:layout_marginEnd="@dimen/dp_12"
            android:layout_marginBottom="@dimen/dp_36" />

        <androidx.appcompat.widget.AppCompatImageView
            android:id="@+id/iv_fences_zone_map_switch_btn"
            style="@style/map_image_white_btn_style"
            android:layout_above="@id/iv_fences_zone_refresh_btn"
            android:layout_alignEnd="@id/iv_fences_zone_refresh_btn"
            android:layout_marginBottom="@dimen/dp_12" />
    </RelativeLayout>

    <RelativeLayout
        android:id="@+id/rl_add_edit_fences_zone_info_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:background="@drawable/shape20_white_half_bottom_bg"
        android:clickable="true"
        android:focusable="true"
        android:paddingHorizontal="@dimen/dp_22"
        android:paddingBottom="@dimen/dp_22">

        <View
            android:id="@+id/fences_zone_zooming_view"
            android:layout_width="@dimen/dp_20"
            android:layout_height="@dimen/dp_4"
            android:layout_centerHorizontal="true"
            android:layout_marginTop="@dimen/dp_12"
            android:layout_marginBottom="@dimen/dp_8"
            android:background="@drawable/shape8_gray_bg" />

        <com.abbidot.tracker.widget.TypefaceTextView
            android:id="@+id/tv_fences_zone_shape_reset_btn"
            style="@style/my_TextView_style_v2"
            android:layout_below="@id/fences_zone_zooming_view"
            android:layout_alignParentEnd="true"
            android:background="@drawable/selector_transparent_pressed"
            android:padding="@dimen/dp_8"
            android:text="@string/txt_reset"
            android:textAllCaps="true"
            android:textColor="@color/select_color"
            android:textSize="@dimen/textSize12"
            android:textStyle="bold"
            android:visibility="gone"
            app:typeface="@string/roboto_bold_font" />

        <com.abbidot.tracker.widget.TypefaceTextView
            android:id="@+id/tv_fences_zone_gps_location"
            style="@style/my_TextView_style_v2"
            android:layout_height="@dimen/dp_40"
            android:layout_alignTop="@id/tv_fences_zone_shape_reset_btn"
            android:layout_alignParentStart="true"
            android:layout_marginEnd="@dimen/dp_8"
            android:layout_toStartOf="@id/tv_fences_zone_shape_reset_btn"
            android:drawableStart="@drawable/icon_wif_location_svg"
            android:drawablePadding="@dimen/dp_8"
            android:ellipsize="end"
            android:gravity="start|center"
            android:lines="2"
            android:text="@string/app_name"
            android:textColor="@color/select_color3"
            android:textSize="@dimen/textSize12"
            android:visibility="gone"
            app:typeface="@string/roboto_regular_font" />

        <include
            android:id="@+id/il_fences_zone_name_input"
            layout="@layout/layout_input_edit_view"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_66"
            android:layout_below="@id/tv_fences_zone_gps_location"
            android:layout_marginTop="@dimen/dp_12" />


        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_fences_zone_shape_list"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/il_fences_zone_name_input"
            android:layout_marginStart="@dimen/dp_47"
            android:layout_marginTop="@dimen/dp_12" />

        <com.abbidot.tracker.widget.TypefaceTextView
            android:id="@+id/tv_fences_zone_shape_title"
            style="@style/my_TextView_style_v2"
            android:layout_alignTop="@id/rv_fences_zone_shape_list"
            android:layout_alignBottom="@id/rv_fences_zone_shape_list"
            android:text="@string/tracker_manage_set_fence_shape"
            android:textSize="@dimen/textSize14"
            app:typeface="@string/roboto_bold_font" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/rv_fences_zone_image_type_list"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_below="@id/rv_fences_zone_shape_list"
            android:layout_marginTop="@dimen/dp_13"
            android:gravity="center" />

        <View
            android:id="@+id/fences_zone_placeholder_view"
            android:layout_width="@dimen/dp_16"
            android:layout_height="@dimen/dp_1"
            android:layout_centerHorizontal="true" />

        <com.abbidot.tracker.widget.TypefaceButton
            android:id="@+id/btn_cancel_fences_zone"
            style="@style/my_RoundRect_Button_style"
            android:layout_below="@id/rv_fences_zone_image_type_list"
            android:layout_alignParentStart="true"
            android:layout_marginTop="@dimen/dp_22"
            android:layout_marginBottom="@dimen/dp_6"
            android:layout_toStartOf="@id/fences_zone_placeholder_view"
            android:background="@color/block_color"
            android:text="@string/txt_cancel"
            app:qmui_radius="@dimen/dp_24"
            app:typeface="@string/roboto_bold_font" />

        <com.abbidot.tracker.widget.TypefaceButton
            android:id="@+id/btn_save_fences_zone"
            style="@style/my_RoundRect_Button_style"
            android:layout_below="@id/rv_fences_zone_image_type_list"
            android:layout_alignTop="@id/btn_cancel_fences_zone"
            android:layout_alignParentEnd="true"
            android:layout_toEndOf="@id/fences_zone_placeholder_view"
            android:background="@color/select_color2"
            android:text="@string/acccount_btn_save"
            app:qmui_radius="@dimen/dp_24"
            app:typeface="@string/roboto_bold_font" />
    </RelativeLayout>
</RelativeLayout>