<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2011 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.
-->

<!-- *** Note *** This should mirror the file in layout/ with the exception of the background set
     here for adding a drop shadow on tablets. -->

<com.android.internal.widget.TransportControlView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/transport_controls"
    android:background="@drawable/transportcontrol_bg">

    <!-- FrameLayout used as scrim to show between album art and buttons -->
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:foreground="@drawable/ic_lockscreen_player_background">
        <!-- We use ImageView for its cropping features, otherwise could be android:background -->
        <ImageView
            android:id="@+id/albumart"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="fill"
            android:scaleType="centerCrop"
            android:adjustViewBounds="false"
        />
    </FrameLayout>

    <LinearLayout
        android:orientation="vertical"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom">
        <TextView
            android:id="@+id/title"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="8dip"
            android:layout_marginStart="16dip"
            android:layout_marginEnd="16dip"
            android:gravity="center_horizontal"
            android:singleLine="true"
            android:ellipsize="end"
            android:textAppearance="?android:attr/textAppearanceMedium"
        />
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:layout_marginTop="5dip">
            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1">
                <ImageView
                    android:id="@+id/btn_prev"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:src="@drawable/ic_media_previous"
                    android:clickable="true"
                    android:background="?android:attr/selectableItemBackground"
                    android:padding="10dip"
                    android:contentDescription="@string/lockscreen_transport_prev_description"/>
            </FrameLayout>
            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1">
                <ImageView
                    android:id="@+id/btn_play"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:clickable="true"
                    android:src="@drawable/ic_media_play"
                    android:background="?android:attr/selectableItemBackground"
                    android:padding="10dip"
                    android:contentDescription="@string/lockscreen_transport_play_description"/>
            </FrameLayout>
            <FrameLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1">
                <ImageView
                    android:id="@+id/btn_next"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:clickable="true"
                    android:src="@drawable/ic_media_next"
                    android:background="?android:attr/selectableItemBackground"
                    android:padding="10dip"
                    android:contentDescription="@string/lockscreen_transport_next_description"/>
            </FrameLayout>
        </LinearLayout>
    </LinearLayout>

</com.android.internal.widget.TransportControlView>
