<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2019 Jannis Scheibe <jannis@tadris.de>
  ~
  ~ This file is part of FitoTrack
  ~
  ~ FitoTrack is free software: you can redistribute it and/or modify
  ~     it under the terms of the GNU General Public License as published by
  ~     the Free Software Foundation, either version 3 of the License, or
  ~     (at your option) any later version.
  ~
  ~     FitoTrack is distributed in the hope that it will be useful,
  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~     GNU General Public License for more details.
  ~
  ~     You should have received a copy of the GNU General Public License
  ~     along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<RelativeLayout 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"
    tools:context=".activity.RecordWorkoutActivity">

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@id/recordInfoRoot">


        <LinearLayout
            android:id="@+id/recordMapViewrRoot"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

        </LinearLayout>


        <ImageView
            android:id="@+id/imageView"
            android:layout_width="40dp"
            android:layout_height="40dp"
            android:layout_gravity="center"
            android:src="@drawable/location_marker" />

        <TextView
            android:id="@+id/recordGpsStatus"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="bottom|right"
            android:layout_margin="5dp"
            android:text="@string/gps"
            android:textColor="@android:color/transparent" />


    </FrameLayout>

    <LinearLayout
        android:id="@+id/recordInfoRoot"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:layout_alignParentBottom="true"
        android:layout_marginBottom="0dp"
        android:padding="10dp"
        android:orientation="vertical">

        <TextView
            android:id="@+id/recordTime"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:fontFamily="sans-serif-black"
            android:text="0:44:08"
            android:textAlignment="center"
            android:textColor="@android:color/black"
            android:textSize="30sp"
            android:textStyle="bold" />

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.5" />

            <LinearLayout
                android:id="@+id/linearLayout"
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:layout_marginStart="8dp"
                android:orientation="vertical"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@+id/guideline2"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/recordInfo1Title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/workoutDistance"
                    android:textAlignment="center"
                    android:textAllCaps="true"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo1Value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="2,06 km"
                    android:textAlignment="center"
                    android:textAllCaps="false"
                    android:textColor="@android:color/black"
                    android:textSize="24sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo2Title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/workoutBurnedEnergy"
                    android:textAlignment="center"
                    android:textAllCaps="true"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo2Value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="30 kcal"
                    android:textAlignment="center"
                    android:textAllCaps="false"
                    android:textColor="@android:color/black"
                    android:textSize="24sp"
                    android:textStyle="bold" />

            </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="match_parent"
                android:orientation="vertical"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@+id/linearLayout"
                app:layout_constraintTop_toTopOf="parent">

                <TextView
                    android:id="@+id/recordInfo3Title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/workoutAvgSpeed"
                    android:textAlignment="center"
                    android:textAllCaps="true"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo3Value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="7 km/h"
                    android:textAlignment="center"
                    android:textAllCaps="false"
                    android:textColor="@android:color/black"
                    android:textSize="24sp"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo4Title"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/workoutBurnedEnergy"
                    android:textAlignment="center"
                    android:textAllCaps="true"
                    android:textStyle="bold" />

                <TextView
                    android:id="@+id/recordInfo4Value"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="30 kcal"
                    android:textAlignment="center"
                    android:textAllCaps="false"
                    android:textColor="@android:color/black"
                    android:textSize="24sp"
                    android:textStyle="bold" />

            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>

    </LinearLayout>

    <FrameLayout
        android:id="@+id/recorderWaitingOverlay"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@android:color/holo_red_light">

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

            <ImageView
                android:id="@+id/imageView3"
                android:layout_width="match_parent"
                android:layout_height="200dp"
                android:src="@drawable/ic_gps_no_fix" />

            <TextView
                android:id="@+id/textView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_margin="20dp"
                android:text="@string/waiting_gps"
                android:textAlignment="center"
                android:textColor="@android:color/background_light"
                android:textSize="30sp" />
        </LinearLayout>
    </FrameLayout>

</RelativeLayout>