<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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:id="@+id/map_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:keepScreenOn="true">

    <org.osmdroid.views.MapView
        android:id="@+id/map_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

    </org.osmdroid.views.MapView>

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/map_data_root"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:layout_marginTop="4dp"
        android:layout_marginEnd="4dp"
        android:background="@drawable/map_info_rounded"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_lat"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginStart="8dp"
            android:layout_marginTop="4dp"
            android:text="@string/pat_osm_lat"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_lon"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"
            android:text="@string/pat_osm_lon"
            app:layout_constraintStart_toStartOf="@+id/map_data_lat"
            app:layout_constraintTop_toBottomOf="@+id/map_data_lat" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_qth"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="2dp"
            android:text="@string/map_qth"
            app:layout_constraintStart_toStartOf="@+id/map_data_lon"
            app:layout_constraintTop_toBottomOf="@+id/map_data_lon" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_alt"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:text="@string/pat_altitude"
            app:layout_constraintBaseline_toBaselineOf="@+id/map_data_lat"
            app:layout_constraintEnd_toEndOf="parent" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_dst"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/pat_distance"
            app:layout_constraintBaseline_toBaselineOf="@+id/map_data_lon"
            app:layout_constraintEnd_toEndOf="@+id/map_data_alt" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_vel"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/pat_osm_vel"
            app:layout_constraintBaseline_toBaselineOf="@+id/map_data_qth"
            app:layout_constraintEnd_toEndOf="@+id/map_data_dst" />

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/map_data_name"
            style="@style/MapInfoText"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginBottom="4dp"
            android:text="@string/pat_osm_idName"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/map_data_qth" />

    </androidx.constraintlayout.widget.ConstraintLayout>

    <ImageButton
        android:id="@+id/map_btn_prev"
        android:layout_width="52dp"
        android:layout_height="52dp"
        android:layout_marginStart="@dimen/fab_padding"
        android:layout_marginBottom="@dimen/fab_padding"
        android:backgroundTint="@color/greySurface"
        android:contentDescription="@string/placeholder"
        android:rotation="180"
        android:src="@drawable/ic_next"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:ignore="DuplicateSpeakableTextCheck" />

    <ImageButton
        android:id="@+id/map_btn_next"
        android:layout_width="52dp"
        android:layout_height="52dp"
        android:layout_marginEnd="@dimen/fab_padding"
        android:layout_marginBottom="@dimen/fab_padding"
        android:backgroundTint="@color/greySurface"
        android:contentDescription="@string/placeholder"
        android:src="@drawable/ic_next"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/map_copyright"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="@string/map_copyright"
        android:textColor="@color/themeLight"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>