<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/white"
    android:fitsSystemWindows="true">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/appBarLayout"
        android:layout_width="match_parent"
        android:layout_height="250dp"
        android:fitsSystemWindows="true"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <com.google.android.material.appbar.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#2f6aac"
            android:fitsSystemWindows="true"
            app:collapsedTitleGravity="center|left"
            app:expandedTitleGravity="center|bottom"
            app:expandedTitleTextAppearance="?android:textAppearanceLarge"
            app:layout_scrollFlags="scroll|exitUntilCollapsed">

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginLeft="@dimen/textSize"
                android:layout_marginRight="@dimen/textSize"
                android:orientation="vertical">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:orientation="horizontal">

                    <ImageButton
                        android:id="@+id/stopButton"
                        android:layout_width="@dimen/buttonHeightNormal"
                        android:layout_height="@dimen/buttonHeightNormal"
                        android:layout_gravity="center|right"
                        android:background="@android:color/transparent"
                        android:contentDescription="@string/action_submit"
                        android:scaleType="fitCenter"
                        android:src="@drawable/stop_button" />

                    <androidx.appcompat.widget.AppCompatSeekBar
                        android:id="@+id/seekBar"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:minHeight="@dimen/buttonHeightSmall"
                        android:progressBackgroundTint="@color/material_white"
                        android:progressBackgroundTintMode="src_in"
                        android:progressTint="@color/material_red800"
                        android:progressTintMode="src_in"
                        android:secondaryProgressTint="@color/material_green500"
                        android:secondaryProgressTintMode="src_in"
                        android:thumbTint="@color/material_white" />
                </LinearLayout>


                <TextView
                    android:id="@+id/seekValue"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center|right"
                    android:paddingRight="@dimen/textSizeSmall"
                    android:text="00:00/00:00"
                    android:textColor="@color/material_white"
                    android:textSize="@dimen/textSizeAverage" />
            </LinearLayout>


            <ProgressBar
                android:id="@+id/progressBar"
                android:layout_width="@dimen/buttonHeightNormal"
                android:layout_height="@dimen/buttonHeightNormal"
                android:layout_gravity="center"
                android:visibility="gone" />

            <androidx.appcompat.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?android:attr/actionBarSize"
                app:layout_collapseMode="pin"
                app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

                <ImageButton
                    android:id="@+id/toolPlayIcon"
                    android:layout_width="@dimen/buttonHeightNormal"
                    android:layout_height="@dimen/buttonHeightNormal"
                    android:layout_gravity="center|right"
                    android:layout_marginRight="@dimen/textSizeSmall"
                    android:background="@android:color/transparent"
                    android:contentDescription="@string/action_submit"
                    android:scaleType="fitCenter"
                    android:src="@mipmap/play_icon_white"
                    android:visibility="gone" />

            </androidx.appcompat.widget.Toolbar>

        </com.google.android.material.appbar.CollapsingToolbarLayout>

    </com.google.android.material.appbar.AppBarLayout>

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
            android:paddingTop="24dp">

            <TextView
                android:id="@+id/contentTitle"
                android:layout_width="match_parent"
                android:layout_height="@dimen/buttonHeight"
                android:layout_marginTop="@dimen/seekbarsize"
                android:background="@color/material_white"
                android:gravity="center|left"
                android:padding="@dimen/seekbarsize"
                android:textColor="@color/material_black"
                android:textSize="@dimen/textSizeSmall"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/contentDescription"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/material_white"
                android:padding="@dimen/textSizeToSmall"
                android:scrollbars="vertical"
                android:textColor="@color/material_black"
                android:textSize="@dimen/textSizeAverage" />
        </LinearLayout>

    </androidx.core.widget.NestedScrollView>

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/playButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="@dimen/fab_margin"
        android:clickable="true"
        android:focusable="true"
        app:backgroundTint="@color/material_white"
        app:layout_anchor="@id/appBarLayout"
        app:layout_anchorGravity="bottom|right|end"
        app:srcCompat="@mipmap/play_icon" />

</androidx.coordinatorlayout.widget.CoordinatorLayout>
