<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.gms.maps.MapView
        android:id="@+id/map_mapview"
        android:layout_width="match_parent"
        android:layout_height="match_parent"/>

    <!--START LAYOUT -->
    <LinearLayout
        android:id="@+id/map_layout_start"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="#000000"
        android:orientation="horizontal">

        <Button
            android:id="@+id/map_layout_start_button_send_command"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/send_command"/>

        <Button
            android:id="@+id/map_layout_start_button_add_point"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="@string/add_point"/>

        <Button
            android:id="@+id/map_layout_start_button_view_all"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="View All" />

    </LinearLayout>


    <!--ADD POINT LAYOUT -->
    <RelativeLayout
        android:id="@+id/map_layout_add_point"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="#000000">

        <TextView
            android:id="@+id/map_layout_add_point_textview_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:text="@string/name"/>

        <EditText
            android:id="@+id/map_layout_add_point_edittext_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_toRightOf="@id/map_layout_add_point_textview_name"
            android:layout_alignParentRight="true"
            android:maxLines="1"
            android:maxLength="50"
            android:hint="@string/enter_name"/>

        <TextView
            android:id="@+id/map_layout_add_point_textview_latitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_add_point_edittext_name"
            android:layout_alignParentLeft="true"
            android:text="@string/latitude"/>

        <EditText
            android:id="@+id/map_layout_add_point_edittext_latitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_add_point_edittext_name"
            android:layout_toRightOf="@id/map_layout_add_point_textview_latitude"
            android:layout_alignParentRight="true"
            android:maxLines="1"
            android:maxLength="16"
            android:inputType="numberDecimal|numberSigned"
            android:hint="@string/enter_point"/>

        <TextView
            android:id="@+id/map_layout_add_point_textview_longitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_add_point_edittext_latitude"
            android:layout_alignParentLeft="true"
            android:text="@string/longitude"/>

        <EditText
            android:id="@+id/map_layout_add_point_edittext_longitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_add_point_edittext_latitude"
            android:layout_toRightOf="@id/map_layout_add_point_textview_longitude"
            android:layout_alignParentRight="true"
            android:maxLines="1"
            android:maxLength="16"
            android:inputType="numberDecimal|numberSigned"
            android:hint="@string/enter_point"/>

        <Button
            android:id="@+id/map_layout_add_point_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_add_point_edittext_longitude"
            android:layout_alignParentRight="true"
            android:text="@string/add_point"/>

    </RelativeLayout>

    <!--COMMANDS LAYOUT -->
    <RelativeLayout
        android:id="@+id/map_layout_commands"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="#000000">

        <TextView
            android:id="@+id/map_layout_commands_center"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"/>

        <Button
            android:id="@+id/map_layout_commands_button_take_photo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@id/map_layout_commands_center"
            android:text="@string/take_photo"/>

        <Button
            android:id="@+id/map_layout_commands_button_goto_point"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_alignParentRight="true"
            android:layout_toRightOf="@id/map_layout_commands_center"
            android:text="@string/go_to_point"/>

        <Button
            android:id="@+id/map_layout_commands_button_goto_surface"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_commands_button_take_photo"
            android:layout_alignParentLeft="true"
            android:layout_toLeftOf="@id/map_layout_commands_center"
            android:text="@string/go_to_surface"/>

        <Button
            android:id="@+id/map_layout_commands_button_hold_position"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_commands_button_goto_point"
            android:layout_alignParentRight="true"
            android:layout_toRightOf="@id/map_layout_commands_center"
            android:text="@string/hold_position"/>

        <Button
            android:id="@+id/map_layout_commands_button_resume_operation"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_commands_button_goto_surface"
            android:layout_alignParentLeft="true"
            android:layout_alignParentRight="true"
            android:text="@string/resume_operation"/>

    </RelativeLayout>

    <!--GO TO POINT LAYOUT-->
    <RelativeLayout
        android:id="@+id/map_layout_goto_point"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:background="#000000">

        <TextView
            android:id="@+id/map_layout_goto_point_center"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerHorizontal="true"/>

        <CheckBox
            android:id="@+id/map_layout_goto_point_checkbox_take_photo"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:text="Take Photo"/>

        <Spinner
            android:id="@+id/map_layout_goto_point_spinner_points"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_toRightOf="@id/map_layout_goto_point_center"
            android:layout_alignParentTop="true"
            android:layout_alignParentRight="true"/>

        <TextView
            android:id="@+id/map_layout_goto_point_textview_latitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@id/map_layout_goto_point_spinner_points"
            android:text="@string/latitude"/>

        <EditText
            android:id="@+id/map_layout_goto_point_edittext_latitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_goto_point_spinner_points"
            android:layout_toRightOf="@id/map_layout_goto_point_textview_latitude"
            android:layout_alignParentRight="true"
            android:maxLines="1"
            android:maxLength="16"
            android:inputType="numberDecimal|numberSigned"
            android:hint="@string/enter_point"/>

        <TextView
            android:id="@+id/map_layout_goto_point_textview_longitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_below="@id/map_layout_goto_point_edittext_latitude"
            android:text="@string/longitude"/>

        <EditText
            android:id="@+id/map_layout_goto_point_edittext_longitude"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@id/map_layout_goto_point_edittext_latitude"
            android:layout_toRightOf="@id/map_layout_goto_point_textview_longitude"
            android:layout_alignParentRight="true"
            android:maxLines="1"
            android:maxLength="16"
            android:inputType="numberDecimal|numberSigned"
            android:hint="@string/enter_point"/>

        <Button
            android:id="@+id/map_layout_goto_point_button_send_command"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentRight="true"
            android:layout_below="@id/map_layout_goto_point_edittext_longitude"
            android:text="@string/send_command"/>

    </RelativeLayout>

</FrameLayout>