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

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

    <View
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="?attr/colorSurface" />

    <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" />


    <code.name.monkey.retromusic.views.SeekArc
        android:id="@+id/volumeSeekBar"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginStart="16dp"
        android:layout_marginTop="16dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:padding="24dp"
        app:arcColor="?android:attr/colorControlHighlight"
        app:arcWidth="4dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintDimensionRatio="1:1"
        app:layout_constraintEnd_toEndOf="@id/guideline"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/playerToolbar"
        app:progressWidth="4dp"
        app:rotation="180"
        app:roundEdges="true"
        app:startAngle="30"
        app:sweepAngle="300"
        app:touchInside="false"
        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:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/volume"
        android:textAppearance="@style/TextViewSubtitle2"
        android:textColor="?android:attr/textColorSecondary"
        app:layout_constraintBottom_toBottomOf="@+id/volumeSeekBar"
        app:layout_constraintEnd_toEndOf="@+id/volumeSeekBar"
        app:layout_constraintStart_toStartOf="@+id/volumeSeekBar" />

    <LinearLayout
        android:id="@+id/titleContainer"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:paddingHorizontal="16dp"
        app:layout_constraintBottom_toTopOf="@+id/text"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/guideline"
        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="1"
            android:textAppearance="@style/TextViewHeadline4"
            android:textColor="?android:attr/textColorPrimary"
            android:textStyle="bold"
            tools:text="@tools:sample/lorem/random" />
    </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:paddingHorizontal="16dp"
        android:paddingVertical="8dp"
        android:textAppearance="@style/TextViewBody1"
        app:layout_constraintBottom_toTopOf="@id/progressSlider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/guideline"
        app:layout_constraintTop_toBottomOf="@+id/titleContainer"
        tools:text="@tools:sample/lorem/random" />

    <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/text"
        tools:ignore="RtlHardcoded,UnusedAttribute" />

    <com.google.android.material.textview.MaterialTextView
        android:id="@+id/songTotalTime"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:gravity="center_vertical|right|end"
        android:singleLine="true"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="@id/progressSlider"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/progressSlider"
        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/songCurrentProgress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:gravity="center_vertical|left|end"
        android:paddingLeft="8dp"
        android:singleLine="true"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="12sp"
        app:layout_constraintBottom_toBottomOf="@id/progressSlider"
        app:layout_constraintEnd_toStartOf="@id/progressSlider"
        app:layout_constraintStart_toEndOf="@id/guideline"
        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="0dp"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:ellipsize="end"
        android:gravity="center"
        android:maxLines="1"
        android:paddingHorizontal="16dp"
        android:paddingBottom="12dp"
        android:textColor="?android:attr/textColorSecondary"
        android:textSize="12sp"
        app:layout_constrainedWidth="true"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/guideline"
        tools:text="@tools:sample/lorem" />
</androidx.constraintlayout.widget.ConstraintLayout>