<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:transitionGroup="true"
    android:keepScreenOn="true">

    <androidx.cardview.widget.CardView
        android:id="@+id/radar_toolbar"
        style="@style/Toolbar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <ImageButton
            android:id="@+id/radar_btn_back"
            style="@style/ToolbarButton"
            android:layout_gravity="start|center_vertical"
            android:contentDescription="@string/btn_back"
            android:src="@drawable/ic_back" />

        <TextView
            android:id="@+id/radar_timer"
            style="@style/ToolbarTimer" />

        <ImageButton
            android:id="@+id/radar_btn_map"
            style="@style/ToolbarButton"
            android:layout_gravity="end|center_vertical"
            android:contentDescription="@string/btn_map"
            android:src="@drawable/ic_map" />

    </androidx.cardview.widget.CardView>

    <androidx.cardview.widget.CardView
        android:id="@+id/radar_card"
        style="@style/SurfaceCard"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="@dimen/view_default_margin"
        android:layout_marginTop="@dimen/view_default_margin"
        android:layout_marginEnd="@dimen/view_default_margin"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/radar_toolbar" />

    <TextView
        android:id="@+id/radar_az_value"
        style="@style/RadarValue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:layout_marginTop="4dp"
        android:text="@string/radar_az_value"
        app:layout_constraintStart_toStartOf="@+id/radar_card"
        app:layout_constraintTop_toTopOf="@+id/radar_card" />

    <TextView
        android:id="@+id/radar_az"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/radar_az_text"
        android:textSize="@dimen/text_size_small"
        app:layout_constraintStart_toStartOf="@+id/radar_az_value"
        app:layout_constraintTop_toBottomOf="@+id/radar_az_value" />

    <TextView
        android:id="@+id/radar_el_value"
        style="@style/RadarValue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:text="@string/radar_el_value"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_az_value"
        app:layout_constraintEnd_toEndOf="@+id/radar_card" />

    <TextView
        android:id="@+id/radar_el"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/radar_el_text"
        android:textSize="@dimen/text_size_small"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_az"
        app:layout_constraintEnd_toEndOf="@+id/radar_el_value" />

    <TextView
        android:id="@+id/radar_alt_value"
        style="@style/RadarValue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="4dp"
        android:text="@string/radar_alt_value"
        app:layout_constraintBottom_toBottomOf="@+id/radar_card"
        app:layout_constraintStart_toStartOf="@+id/radar_az_value" />

    <TextView
        android:id="@+id/radar_alt"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/radar_alt_text"
        android:textSize="@dimen/text_size_small"
        app:layout_constraintBottom_toTopOf="@+id/radar_alt_value"
        app:layout_constraintStart_toStartOf="@+id/radar_alt_value" />

    <TextView
        android:id="@+id/radar_dst_value"
        style="@style/RadarValue"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/radar_dist_value"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_alt_value"
        app:layout_constraintEnd_toEndOf="@+id/radar_el_value" />

    <TextView
        android:id="@+id/radar_dst"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/radar_dist_text"
        android:textSize="@dimen/text_size_small"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_alt"
        app:layout_constraintEnd_toEndOf="@+id/radar_dst_value" />

    <androidx.cardview.widget.CardView
        android:id="@+id/radar_list_card"
        style="@style/SurfaceCard"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="@dimen/view_default_margin"
        android:layout_marginTop="@dimen/view_default_margin"
        android:layout_marginEnd="@dimen/view_default_margin"
        android:layout_marginBottom="@dimen/view_default_margin"
        app:layout_constraintBottom_toTopOf="@+id/radar_coordinator"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/radar_card">

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/radar_recycler"
            style="@style/Recycler"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

        <ProgressBar
            android:id="@+id/radar_progress"
            style="@style/RecyclerProgress" />

        <LinearLayout
            android:id="@+id/radar_empty_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:orientation="vertical"
            android:visibility="invisible"
            tools:ignore="UseCompoundDrawables">

            <ImageView
                android:id="@+id/radar_empty_img"
                android:layout_width="64dp"
                android:layout_height="64dp"
                android:layout_gravity="center"
                android:layout_marginBottom="24dp"
                android:contentDescription="@string/radio_no_data"
                android:src="@drawable/ic_modes" />

            <TextView
                android:id="@+id/radar_empty_msg"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:gravity="center"
                android:includeFontPadding="false"
                android:text="@string/radio_no_data"
                android:textSize="@dimen/text_size_mediumLarge" />

        </LinearLayout>

    </androidx.cardview.widget.CardView>

    <androidx.coordinatorlayout.widget.CoordinatorLayout
        android:id="@+id/radar_coordinator"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">

        <com.google.android.material.bottomappbar.BottomAppBar
            android:id="@+id/radar_bottom_bar"
            style="@style/BottomBar" />

    </androidx.coordinatorlayout.widget.CoordinatorLayout>

    <Button
        android:id="@+id/radar_btn_notify"
        style="@style/NormalButton"
        android:layout_width="0dp"
        android:layout_marginStart="@dimen/button_margin_side"
        android:text="@string/btn_notify"
        app:layout_constraintBottom_toBottomOf="@+id/radar_coordinator"
        app:layout_constraintEnd_toStartOf="@+id/radar_visibility"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@+id/radar_coordinator"
        app:layout_constraintStart_toStartOf="@+id/radar_coordinator"
        app:layout_constraintTop_toTopOf="@+id/radar_coordinator" />

    <TextView
        android:id="@+id/radar_visibility"
        style="@style/WorldMapText"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginStart="4dp"
        android:layout_marginEnd="4dp"
        android:ellipsize="end"
        android:gravity="center_horizontal"
        android:maxLines="1"
        android:text="@string/radar_visible"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_btn_notify"
        app:layout_constraintEnd_toStartOf="@+id/radar_btn_settings"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintStart_toEndOf="@+id/radar_btn_notify" />

    <Button
        android:id="@+id/radar_btn_settings"
        style="@style/NormalButton"
        android:layout_width="0dp"
        android:layout_marginEnd="@dimen/button_margin_side"
        android:text="@string/btn_settings"
        app:layout_constraintBaseline_toBaselineOf="@+id/radar_btn_notify"
        app:layout_constraintEnd_toEndOf="@+id/radar_coordinator"
        app:layout_constraintStart_toEndOf="@+id/radar_visibility" />

</androidx.constraintlayout.widget.ConstraintLayout>
