1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  Copyright 2018, The Android Open Source Project
4
5  Licensed under the Apache License, Version 2.0 (the "License");
6  you may not use this file except in compliance with the License.
7  You may obtain a copy of the License at
8
9      http://www.apache.org/licenses/LICENSE-2.0
10
11  Unless required by applicable law or agreed to in writing, software
12  distributed under the License is distributed on an "AS IS" BASIS,
13  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  See the License for the specific language governing permissions and
15  limitations under the License.
16-->
17<androidx.cardview.widget.CardView
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
20    xmlns:tools="http://schemas.android.com/tools"
21    android:layout_height="match_parent"
22    android:layout_width="match_parent"
23    app:cardElevation="0dp"
24    app:cardCornerRadius="6dp">
25
26    <View
27        android:id="@+id/playback_scrim"
28        android:layout_width="match_parent"
29        android:layout_height="match_parent"
30        android:background="@color/album_art_scrim"
31        android:alpha="@dimen/album_art_scrim_alpha"/>
32
33    <androidx.constraintlayout.widget.ConstraintLayout
34        xmlns:android="http://schemas.android.com/apk/res/android"
35        xmlns:app="http://schemas.android.com/apk/res-auto"
36        android:id="@+id/playback_container"
37        android:layout_width="match_parent"
38        android:layout_height="match_parent">
39
40        <TextView
41            android:id="@+id/app_name"
42            android:layout_width="wrap_content"
43            android:layout_height="wrap_content"
44            android:layout_marginTop="@dimen/playback_fragment_text_margin_top"
45            android:layout_marginLeft="@dimen/playback_fragment_text_margin_x"
46            android:layout_marginRight="@dimen/playback_fragment_text_margin_x"
47            android:textAppearance="?android:attr/textAppearanceMedium"
48            android:ellipsize="end"
49            android:maxLines="1"
50            android:includeFontPadding="false"
51            app:layout_constraintLeft_toLeftOf="parent"
52            app:layout_constraintTop_toTopOf="parent"/>
53
54        <ImageView
55            android:id="@+id/app_icon"
56            android:layout_width="@dimen/playback_app_icon_size"
57            android:layout_height="@dimen/playback_app_icon_size"
58            android:layout_marginTop="@dimen/playback_fragment_icon_margin_top"
59            android:layout_marginLeft="@dimen/playback_fragment_icon_margin_x"
60            app:layout_constraintStart_toEndOf="@+id/app_name"
61            app:layout_constraintTop_toTopOf="parent"/>
62
63        <androidx.constraintlayout.widget.Guideline
64            android:id="@+id/margin_start"
65            android:layout_width="0dp"
66            android:layout_height="0dp"
67            android:orientation="vertical"
68            app:layout_constraintGuide_begin="@dimen/fragment_playback_guide_margin_x"/>
69
70        <androidx.constraintlayout.widget.Guideline
71            android:id="@+id/margin_end"
72            android:layout_width="wrap_content"
73            android:layout_height="wrap_content"
74            android:orientation="vertical"
75            app:layout_constraintGuide_end="@dimen/fragment_playback_guide_margin_x"/>
76
77        <androidx.constraintlayout.widget.Guideline
78            android:id="@+id/margin_top"
79            android:layout_width="wrap_content"
80            android:layout_height="wrap_content"
81            android:orientation="horizontal"
82            app:layout_constraintGuide_begin="@dimen/fragment_playback_guide_margin_top"/>
83
84        <ImageView
85            android:id="@+id/album_art"
86            android:layout_width="@dimen/playback_album_art_size_normal"
87            android:layout_height="@dimen/playback_album_art_size_normal"
88            android:layout_marginStart="@dimen/fragment_metadata_art_margin_start"
89            android:layout_marginEnd="@dimen/fragment_metadata_art_margin_end"
90            android:contentDescription="@string/album_art"
91            android:background="@color/album_art_background"
92            android:scaleType="centerCrop"
93            android:transitionName="@string/album_art"
94            app:layout_constraintTop_toTopOf="@+id/app_name"
95            app:layout_constraintBottom_toBottomOf="parent"
96            app:layout_constraintStart_toStartOf="@+id/margin_start"
97            tools:src="@drawable/ic_person"/>
98
99        <include
100            android:id="@+id/metadata_subcontainer"
101            layout="@layout/metadata_normal"
102            android:layout_width="0dp"
103            android:layout_height="wrap_content"
104            android:layout_marginStart="@dimen/fragment_metadata_metadata_margin_start"
105            android:layout_marginEnd="@dimen/fragment_metadata_metadata_margin_end"
106            app:layout_constraintBottom_toBottomOf="@+id/album_art"
107            app:layout_constraintEnd_toEndOf="@+id/margin_end"
108            app:layout_constraintStart_toEndOf="@+id/album_art"
109            app:layout_constraintTop_toTopOf="@+id/album_art"/>
110
111    </androidx.constraintlayout.widget.ConstraintLayout>
112
113</androidx.cardview.widget.CardView>
114