<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:background="@color/white">

    <ImageView
        android:id="@+id/back_btn"
        android:layout_width="35sp"
        android:layout_height="35sp"
        android:layout_margin="15dp"
        android:contentDescription="@string/back_button"
        android:padding="5dp"
        android:paddingStart="-15dp"
        android:paddingEnd="0dp"
        android:src="@drawable/arrow_back" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:text="@string/geofencing"
        android:fontFamily="@font/nunito_medium"
        android:textColor="@color/black"
        android:textSize="@dimen/_18ssp"

        android:layout_marginHorizontal="15dp"

        />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"

        android:text="@string/set_specific_geographic_areas_and_receive_instant_alerts_when_your_loved_one_leaves_the_geofenced_zone"
        android:fontFamily="@font/nunito_regular"
        android:layout_marginHorizontal="15dp"
        android:textSize="@dimen/_14ssp"

        android:layout_marginVertical="15dp"

        />

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <fragment
            android:id="@+id/geofence_map"
            android:name="com.google.android.gms.maps.SupportMapFragment"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/search"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="@dimen/_10sdp"
            android:layout_marginTop="@dimen/_10sdp"

            app:cardBackgroundColor="@color/white"
            app:cardElevation="5dp"

            app:strokeWidth="0.5dp"
            app:strokeColor="@color/color_accent"

            app:cardCornerRadius="20dp"

            >

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"

                android:text="@string/enter_new_address_here"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@android:color/darker_gray"
                android:textSize="@dimen/_14ssp"

                android:layout_marginVertical="10dp"
                android:layout_marginHorizontal="15dp"

                app:drawableStartCompat="@drawable/ic_search_outline"
                android:drawablePadding="15dp"

                />

        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:layout_below="@id/search"

            android:layout_width="match_parent"
            android:layout_height="wrap_content"

            android:layout_marginHorizontal="@dimen/_10sdp"
            android:layout_marginTop="@dimen/_10sdp"

            app:cardBackgroundColor="@color/white"
            app:cardElevation="5dp"

            app:strokeWidth="1dp"
            app:strokeColor="@color/color_accent"

            app:cardCornerRadius="10dp"

            >

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent">

                <TextView
                    android:id="@+id/distance_away_txt"
                    android:visibility="gone"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:text="@string/destination_0_5m_away"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_14ssp"

                    android:layout_marginTop="15dp"
                    android:layout_marginHorizontal="15dp"

                    />

                <TextView
                    android:id="@+id/senior_title"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"

                    android:text="@string/senior_address"
                    android:fontFamily="@font/nunito_bold"
                    android:textColor="@color/black"
                    android:textSize="@dimen/_14ssp"

                    android:layout_marginHorizontal="15dp"
                    android:layout_marginTop="5dp"

                    />

                <TextView
                    android:id="@+id/home_address"
                    android:layout_below="@id/senior_title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:layout_toStartOf="@id/set_gf"

                    android:text="@string/loading"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@android:color/black"
                    android:textSize="@dimen/_14ssp"

                    android:layout_marginHorizontal="15dp"
                    android:layout_marginBottom="5dp"

                    android:maxLines="2"
                    android:ellipsize="end"

                    />

                <ImageView
                    android:id="@+id/set_gf"
                    android:layout_width="25dp"
                    android:layout_height="25dp"

                    android:layout_alignParentEnd="true"

                    android:layout_marginVertical="8dp"
                    android:layout_marginEnd="8dp"

                    android:padding="3dp"
                    app:srcCompat="@drawable/ic_setting"
                    app:tint="@color/black" />

                <com.google.android.material.button.MaterialButton
                    android:id="@+id/change_btn"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"

                    android:layout_below="@+id/home_address"
                    android:layout_marginHorizontal="15dp"
                    android:layout_marginBottom="5dp"

                    android:text="@string/change"
                    android:fontFamily="@font/nunito_regular"
                    android:textColor="@color/white"
                    android:textAllCaps="false"

                    />

            </RelativeLayout>

        </com.google.android.material.card.MaterialCardView>

        <LinearLayout
            android:id="@+id/update_btns_view"
            android:visibility="gone"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_margin="15dp"
            android:layout_alignParentBottom="true"
            android:weightSum="2">

            <com.google.android.material.button.MaterialButton
                android:id="@+id/reset_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"

                android:text="@string/cancel"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/black"
                android:textAllCaps="false"

                app:backgroundTint="@color/white"
                app:cornerRadius="5dp"

                />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/update_btn"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"

                android:layout_marginStart="15dp"

                android:text="@string/update"
                android:fontFamily="@font/nunito_regular"
                android:textColor="@color/white"
                android:textAllCaps="false"

                app:backgroundTint="@color/color_primary"
                app:cornerRadius="5dp"

                />

        </LinearLayout>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/home_location_btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/img_pat_curr_location"

            android:layout_alignParentBottom="true"
            android:layout_margin="15dp"

            app:backgroundTint="@color/white"

            app:cardCornerRadius="30dp"
            app:cardElevation="5dp"
            >

            <ImageView
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:src="@drawable/img_home_marker"
                android:layout_margin="8dp"/>

        </com.google.android.material.card.MaterialCardView>

        <com.google.android.material.card.MaterialCardView
            android:id="@+id/cg_location_Btn"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/img_pat_curr_location"

            android:layout_alignParentBottom="true"
            android:layout_alignParentEnd="true"
            android:layout_margin="15dp"

            app:backgroundTint="@color/white"

            app:cardCornerRadius="30dp"
            app:cardElevation="5dp"
            >

            <ImageView
                android:layout_width="40dp"
                android:layout_height="40dp"
                android:src="@drawable/img_pat_curr_location"
                android:layout_margin="8dp"/>

        </com.google.android.material.card.MaterialCardView>

    </RelativeLayout>

</LinearLayout>