<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.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/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/darkBlue"
    android:fitsSystemWindows="true"
    tools:context=".ui.activities.FitnessActivity"
    tools:openDrawer="start">

    <LinearLayout
        android:layout_width="450dp"
        android:layout_height="450dp"
        android:layout_gravity="center"
        android:layout_marginStart="20dp"
        android:layout_marginTop="20dp"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <android.support.v7.widget.CardView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_centerInParent="true"
            app:cardCornerRadius="20dp">

            <VideoView
                android:id="@+id/videoView"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

            <RelativeLayout
                android:id="@+id/loadingPanel"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:gravity="center" >

                <ProgressBar
                    android:id="@+id/loadingCircle"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:indeterminate="true"
                    android:progressTint="@color/white"/>
            </RelativeLayout>

            <Button
                android:id="@+id/infoButtonFitness"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_marginStart="10dp"
                android:layout_marginTop="10dp"
                android:background="@drawable/red_button_gradient"
                android:drawableTop="@drawable/ic_baseline_info_40"
                android:drawableTint="@color/white"
                android:padding="5dp"
                tools:ignore="SpeakableTextPresentCheck" />

        </android.support.v7.widget.CardView>

    </LinearLayout>

    <LinearLayout
        android:layout_width="450dp"
        android:layout_height="450dp"
        android:layout_marginTop="20dp"
        android:layout_marginEnd="20dp"
        android:background="@drawable/border_background"
        android:orientation="vertical"
        android:padding="20dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/textViewFitnessTitle"
            style="@style/TextStyleTitle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:text="@string/title"
            android:textAlignment="center" />

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_margin="10dp"
            android:background="@drawable/border_background_3"
            android:padding="5dp">

            <TextView
                android:id="@+id/textViewFitnessShortDescription"
                style="@style/TextStyleDesc"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="@string/context"
                android:textAlignment="center" />
        </LinearLayout>


        <Button
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_below="@+id/progressText"
            android:layout_gravity="center"
            android:layout_marginTop="20dp"
            android:onClick="incrementProgress"
            android:text="Increment" />

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:layout_margin="10dp"
            android:background="@drawable/border_background_circle">

            <ProgressBar
                android:id="@+id/progressCircle"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="150dp"
                android:layout_height="150dp"
                android:layout_centerInParent="true"
                android:layout_gravity="center"
                android:indeterminate="false"
                android:max="10"
                android:progress="10"
                android:progressDrawable="@drawable/progress_circle" />

            <TextView
                android:id="@+id/progressText"
                style="@style/TextStyle"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:text="0/10" />

        </RelativeLayout>

        <com.example.fitbot.ui.components.ExerciseStatusElement
            android:id="@+id/personalMotionPreviewElement"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />

    </LinearLayout>

    <Button
        android:id="@+id/homeButtonFitness"
        android:layout_width="150dp"
        android:layout_height="75dp"
        android:layout_marginStart="175dp"
        android:layout_marginBottom="30dp"
        android:background="@drawable/red_button_gradient"
        android:drawableTop="@drawable/ic_baseline_home_48"
        android:drawableTint="@color/white"
        android:padding="15dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:ignore="SpeakableTextPresentCheck" />

    <Button
        android:id="@+id/skipButtonFitness"
        android:layout_width="150dp"
        android:layout_height="75dp"
        android:layout_marginEnd="175dp"
        android:layout_marginBottom="30dp"
        android:background="@drawable/red_button_gradient"
        android:drawableTop="@drawable/ic_baseline_skip_next_48"
        android:drawableTint="@color/white"
        android:padding="15dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        tools:ignore="SpeakableTextPresentCheck" />

</android.support.constraint.ConstraintLayout>