<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2020 Hemanth Savarala.
  ~
  ~ Licensed under the GNU General Public License v3
  ~
  ~ This 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.
  ~
  ~ This software 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.
  -->

<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:background="?colorSurface"
    android:clickable="true"
    android:focusable="true"
    android:orientation="vertical">

    <FrameLayout
        android:id="@+id/statusBarContainer"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <include layout="@layout/status_bar" />
    </FrameLayout>

    <com.google.android.material.appbar.MaterialToolbar
        android:id="@+id/playerToolbar"
        style="@style/Toolbar"
        android:navigationIcon="@drawable/ic_keyboard_arrow_down_black"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/statusBarContainer"
        app:navigationIcon="@drawable/ic_keyboard_arrow_down_black"
        tools:layout_editor_absoluteY="24dp" />

    <LinearLayout
        android:id="@+id/titleContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/text"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/playerToolbar">

        <com.google.android.material.textview.MaterialTextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:maxLines="2"
            android:paddingStart="16dp"
            android:paddingEnd="16dp"
            android:textAppearance="@style/TextViewHeadline5"
            android:textColor="?android:attr/textColorPrimary"
            android:textStyle="bold"
            tools:text="@tools:sample/full_names" />
    </LinearLayout>

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/text"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:maxLines="2"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:textAppearance="@style/TextViewBody1"
        app:layout_constraintBottom_toTopOf="@+id/volumeSeekBar"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/titleContainer"
        tools:text="@tools:sample/lorem/random" />

    <FrameLayout
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:padding="10dp"
        app:layout_constraintBottom_toBottomOf="@id/volumeSeekBar"
        app:layout_constraintEnd_toEndOf="@id/volumeSeekBar"
        app:layout_constraintStart_toStartOf="@id/volumeSeekBar"
        app:layout_constraintTop_toTopOf="@id/volumeSeekBar">

        <code.name.monkey.retromusic.views.RetroShapeableImageView
            android:id="@+id/album_cover"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:scaleType="centerCrop"
            tools:srcCompat="@tools:sample/backgrounds/scenic[6]" />

        <code.name.monkey.retromusic.views.RetroShapeableImageView
            android:id="@+id/album_cover_overlay"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:alpha="0.5"
            android:scaleType="centerCrop" />
    </FrameLayout>

    <me.tankery.lib.circularseekbar.CircularSeekBar
        android:id="@+id/volumeSeekBar"
        android:layout_width="wrap_content"
        android:layout_height="300dp"
        app:cs_circle_stroke_width="4dp"
        app:cs_end_angle="60"
        app:cs_move_outside_circle="true"
        app:cs_pointer_color="@color/md_grey_200"
        app:cs_pointer_halo_width="0dp"
        app:cs_pointer_stroke_width="20dp"
        app:cs_start_angle="120"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        tools:progress="50" />

    <com.google.android.material.floatingactionbutton.FloatingActionButton
        android:id="@+id/playPauseButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:backgroundTint="?attr/colorSurface"
        app:layout_constraintBottom_toBottomOf="@id/volumeSeekBar"
        app:layout_constraintEnd_toEndOf="@id/volumeSeekBar"
        app:layout_constraintStart_toStartOf="@id/volumeSeekBar"
        app:layout_constraintTop_toTopOf="@id/volumeSeekBar" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/nextButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="8dp"
        android:padding="16dp"
        app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
        app:layout_constraintStart_toEndOf="@+id/playPauseButton"
        app:layout_constraintTop_toTopOf="@+id/playPauseButton"
        app:srcCompat="@drawable/ic_skip_next_round_white_32dp"
        app:tint="@color/md_green_500" />

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/previousButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:padding="16dp"
        app:layout_constraintBottom_toBottomOf="@+id/playPauseButton"
        app:layout_constraintEnd_toStartOf="@+id/playPauseButton"
        app:layout_constraintTop_toTopOf="@+id/playPauseButton"
        app:srcCompat="@drawable/ic_skip_previous_round_white_32dp"
        app:tint="@color/md_green_500" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/materialTextView3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/volume"
        android:textAppearance="@style/TextViewSubtitle2"
        android:textColor="?android:attr/textColorSecondary"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/volumeSeekBar" />


    <androidx.appcompat.widget.AppCompatSeekBar
        android:id="@+id/progressSlider"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toTopOf="@+id/songInfo"
        app:layout_constraintEnd_toStartOf="@id/songTotalTime"
        app:layout_constraintStart_toEndOf="@id/songCurrentProgress"
        app:layout_constraintTop_toBottomOf="@+id/volumeSeekBar" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/songCurrentProgress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_vertical|left|end"
        android:paddingLeft="16dp"
        android:singleLine="true"
        android:textColor="?android:attr/textColorSecondary"
        app:layout_constraintBottom_toBottomOf="@+id/progressSlider"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="@id/progressSlider"
        tools:ignore="RtlHardcoded,RtlSymmetry"
        tools:text="@tools:sample/date/hhmmss" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/songTotalTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_vertical|right|end"
        android:paddingRight="16dp"
        android:singleLine="true"
        android:textColor="?android:attr/textColorSecondary"
        app:layout_constraintBottom_toBottomOf="@+id/progressSlider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toTopOf="@id/progressSlider"
        tools:ignore="RtlHardcoded,RtlSymmetry"
        tools:text="@tools:sample/date/hhmmss" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/songInfo"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginBottom="16dp"
        android:ellipsize="end"
        android:gravity="center"
        android:maxLines="2"
        android:paddingStart="16dp"
        android:paddingEnd="16dp"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        tools:text="@tools:sample/lorem/random" />
</androidx.constraintlayout.widget.ConstraintLayout>