<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2025 Google LLC

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

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

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

            <Button
                android:id="@+id/stop_animation"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:onClick="onStopAnimation"
                android:text="@string/stop_animation" />

            <ToggleButton
                android:id="@+id/animate"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:checked="true"
                android:onClick="onToggleAnimate"
                android:textOn="@string/animate"
                android:textOff="@string/animate" />
        </LinearLayout>

        <RelativeLayout
            android:layout_width="0dp"
            android:layout_height="match_parent"
            android:gravity="center_horizontal"
            android:layout_weight="1">

            <Button
                android:id="@+id/scroll_left"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onScrollLeft"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:text="@string/left_arrow" />

            <Button
                android:id="@+id/scroll_up"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onScrollUp"
                android:layout_alignParentTop="true"
                android:layout_toRightOf="@id/scroll_left"
                android:text="@string/up_arrow" />

            <Button
                android:id="@+id/scroll_down"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onScrollDown"
                android:layout_below="@id/scroll_up"
                android:layout_toRightOf="@id/scroll_left"
                android:text="@string/down_arrow" />

            <Button
                android:id="@+id/scroll_right"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onScrollRight"
                android:layout_centerVertical="true"
                android:layout_toRightOf="@id/scroll_down"
                android:text="@string/right_arrow" />
        </RelativeLayout>

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

            <Button
                android:id="@+id/zoom_in"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onZoomIn"
                android:text="@string/zoom_in" />

            <Button
                android:id="@+id/zoom_out"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:onClick="onZoomOut"
                android:text="@string/zoom_out" />
        </LinearLayout>

        <LinearLayout
            android:orientation="vertical"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_gravity="right">

            <Button
                android:id="@+id/tilt_more"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:text="@string/tilt_more"
                android:onClick="onTiltMore" />

            <Button
                android:id="@+id/tilt_less"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:minWidth="48dp"
                android:text="@string/tilt_less"
                android:onClick="onTiltLess" />
        </LinearLayout>
    </LinearLayout>

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

        <CheckBox
            android:id="@+id/duration_toggle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="onToggleCustomDuration"
            android:text="@string/duration" />

        <SeekBar
            android:id="@+id/duration_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:max="5000" />
    </LinearLayout>

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

        <Button
            android:id="@+id/sydney"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:onClick="onGoToSydney"
            android:layout_weight="0.5"
            android:text="@string/go_to_sydney" />

        <Button
            android:id="@+id/bondi"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:onClick="onGoToBondi"
            android:layout_weight="0.5"
            android:text="@string/go_to_bondi" />
    </LinearLayout>

    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.libraries.maps.SupportMapFragment" />
</LinearLayout>
