<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<com.android.car.media.util.widgets.MusicPanelLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/music_panel"
    android:layout_width="match_parent"
    android:layout_height="@dimen/action_panel_height"
    android:elevation="@dimen/music_panel_elevation"
    android:layout_gravity="bottom"
    android:visibility="gone"
    app:cardCornerRadius="@dimen/car_card_view_corner_radius" >
    <LinearLayout
        android:id="@+id/controls"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:background="@color/car_card"
        android:gravity="center" >
        <ImageButton
            android:id="@+id/play_queue"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:layout_marginLeft="@dimen/controls_margin"
            android:background="@drawable/music_action_background"
            android:tint="@color/car_tint" />
        <Space
            android:layout_width="@dimen/controls_spacing_outer"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/prev"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:background="@drawable/music_action_background"
            android:tint="@color/car_tint"/>
        <Space
            android:layout_width="@dimen/controls_spacing_inner"
            android:layout_height="match_parent"/>
        <!-- The id is on the FrameLayout because it is used as the click handler to take
             advantage of the larger touch target size -->
        <FrameLayout
            android:id="@+id/play_pause_container"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height">
            <com.android.car.media.util.widgets.PlayPauseStopImageView
                android:id="@+id/play_pause"
                android:layout_width="@dimen/stream_fab_size"
                android:layout_height="@dimen/stream_fab_size"
                android:layout_gravity="center"
                android:scaleType="centerInside"
                android:src="@drawable/ic_play_pause_stop"
                android:focusable="true"
                android:elevation="@dimen/play_pause_elevation"
                android:stateListAnimator="@anim/car_fab_state_list_animator" />
            <ProgressBar
                android:id="@+id/spinner"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:padding="9dp"
                android:indeterminateDrawable="@drawable/music_buffering"
                android:visibility="gone" />
        </FrameLayout>
        <Space
            android:layout_width="@dimen/controls_spacing_inner"
            android:layout_height="match_parent"/>
        <ImageButton
            android:id="@+id/next"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:background="@drawable/music_action_background"
            android:tint="@color/car_tint" />
        <Space
            android:layout_width="@dimen/controls_spacing_outer"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/overflow_on"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:layout_marginRight="@dimen/controls_margin"
            android:background="@drawable/music_action_background"
            android:tint="@color/car_tint" />
    </LinearLayout>
    <LinearLayout
        android:id="@+id/overflow_items"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal"
        android:background="@color/car_card"
        android:gravity="center"
        android:visibility="gone"
        android:alpha="0.0" >
        <ImageButton
            android:id="@+id/custom_action_1"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:layout_marginLeft="@dimen/overflow_margin"
            android:background="@drawable/music_overflow_action_background"
            android:tint="@color/car_tint_light" />
        <Space
            android:layout_width="@dimen/overflow_spacing_outer"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/custom_action_2"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:background="@drawable/music_overflow_action_background"
            android:tint="@color/car_tint_light" />
        <Space
            android:layout_width="@dimen/overflow_spacing_inner"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/custom_action_3"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:background="@drawable/music_overflow_action_background"
            android:tint="@color/car_tint_light" />
        <Space
            android:layout_width="@dimen/overflow_spacing_inner"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/custom_action_4"
            android:visibility="invisible"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:background="@drawable/music_overflow_action_background"
            android:tint="@color/car_tint_light" />
        <Space
            android:layout_width="@dimen/overflow_spacing_outer"
            android:layout_height="match_parent" />
        <ImageButton
            android:id="@+id/overflow_off"
            android:layout_width="@dimen/controls_tap_target_width"
            android:layout_height="@dimen/controls_tap_target_height"
            android:layout_marginRight="@dimen/overflow_margin"
            android:background="@drawable/music_overflow_action_background"
            android:tint="@color/car_tint_light" />
    </LinearLayout>
    <SeekBar
        android:id="@+id/seek_bar"
        android:layout_width="match_parent"
        android:layout_height="@dimen/seek_bar_height"
        android:layout_gravity="top"
        android:focusable="false"
        android:paddingStart="0dp"
        android:paddingEnd="0dp"
        android:progressDrawable="@drawable/seekbar_background"
        android:thumb="@null" />
</com.android.car.media.util.widgets.MusicPanelLayout>