<?xml version="1.0" encoding="utf-8"?>
<com.zepp.www.musicplayer.widget.InsetsPercentRelativeLayout
    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:fitsSystemWindows="true">

    <com.zepp.www.musicplayer.widget.CoverView
        android:id="@+id/cover"
        android:layout_width="match_parent"
        android:layout_centerInParent="true"
        android:scaleType="centerInside"
        android:src="@drawable/album_cover_daft_punk"
        android:transitionName="@string/transition_name_cover"
        app:layout_heightPercent="35%"
        app:shape="circle"
        app:trackAlpha="255"/>

    <include
        android:id="@+id/title"
        layout="@layout/track_title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        app:layout_marginTopPercent="10%"/>

    <com.zepp.www.musicplayer.widget.ProgressView
        android:id="@+id/progress"
        android:layout_centerInParent="true"
        android:transitionName="@string/transition_name_progress"
        app:layout_aspectRatio="100%"
        app:layout_heightPercent="40%"/>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerInParent="true"
        android:onClick="onFabClick"
        android:scaleType="center"
        android:src="@drawable/ic_pause_animatable"
        android:transitionName="@string/transition_name_fab"/>

    <Space
        android:id="@+id/timers_anchor"
        android:layout_height="wrap_content"
        android:layout_below="@id/cover"
        android:layout_centerHorizontal="true"
        app:layout_widthPercent="25%"/>

    <TextView
        android:id="@+id/time"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/timers_anchor"
        android:layout_toStartOf="@id/timers_anchor"
        android:textAppearance="@style/TextAppearance.AppCompat.Caption"
        android:transitionName="@string/transition_name_time"
        tools:text="02:30"/>

    <TextView
        android:id="@+id/duration"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/timers_anchor"
        android:layout_toEndOf="@id/timers_anchor"
        android:textAppearance="@style/TextAppearance.AppCompat.Caption"
        android:transitionName="@string/transition_name_duration"
        tools:text="04:30"/>

    <LinearLayout
        android:id="@+id/ordering"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@id/time"
        android:layout_centerHorizontal="true"
        android:transitionGroup="true">

        <ImageView
            android:id="@+id/repeat"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:clickable="true"
            android:src="@drawable/ic_repeat_white_24dp"/>

        <Space
            android:layout_width="@dimen/activity_horizontal_margin"
            android:layout_height="wrap_content"/>

        <ImageView
            android:id="@+id/shuffle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:background="?attr/selectableItemBackgroundBorderless"
            android:clickable="true"
            android:src="@drawable/ic_shuffle_white_24dp"/>

    </LinearLayout>

    <LinearLayout
        android:id="@+id/controls"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:gravity="center_horizontal"
        android:transitionGroup="true"
        app:layout_marginBottomPercent="5%">

        <ImageView
            android:id="@+id/previous"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_skip_previous_white_24dp"/>

        <ImageView
            android:id="@+id/rewind"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_fast_rewind_white_24dp"/>

        <ImageView
            android:id="@+id/forward"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_fast_forward_white_24dp"/>

        <ImageView
            android:id="@+id/next"
            style="@style/Widget.AppCompat.Button.Borderless"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_skip_next_white_24dp"/>

    </LinearLayout>

</com.zepp.www.musicplayer.widget.InsetsPercentRelativeLayout>
