1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2020 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<ConstraintSet
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto">
20    <Constraint
21        android:id="@+id/icon"
22        android:layout_width="@dimen/qs_media_icon_size"
23        android:layout_height="@dimen/qs_media_icon_size"
24        android:layout_marginStart="18dp"
25        app:layout_constraintTop_toTopOf="@id/app_name"
26        app:layout_constraintBottom_toBottomOf="@id/app_name"
27        app:layout_constraintStart_toStartOf="parent"
28        />
29
30    <Constraint
31        android:id="@+id/app_name"
32        android:layout_width="0dp"
33        android:layout_height="wrap_content"
34        android:layout_marginEnd="@dimen/qs_center_guideline_padding"
35        android:layout_marginStart="10dp"
36        android:layout_marginTop="20dp"
37        app:layout_constraintTop_toTopOf="parent"
38        app:layout_constraintStart_toEndOf="@id/icon"
39        app:layout_constraintEnd_toStartOf="@id/center_vertical_guideline"
40        app:layout_constraintHorizontal_bias="0"
41        />
42
43    <Constraint
44        android:id="@+id/media_seamless"
45        android:layout_width="wrap_content"
46        android:layout_height="wrap_content"
47        app:layout_constraintEnd_toEndOf="parent"
48        app:layout_constraintTop_toTopOf="parent"
49        app:layout_constrainedWidth="true"
50        app:layout_constraintWidth_min="60dp"
51        app:layout_constraintStart_toEndOf="@id/center_vertical_guideline"
52        app:layout_constraintHorizontal_bias="1"
53        android:layout_marginTop="@dimen/qs_media_panel_outer_padding"
54        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
55        android:layout_marginStart="@dimen/qs_center_guideline_padding"
56        />
57
58    <Constraint
59        android:id="@+id/media_seamless_fallback"
60        android:layout_width="@dimen/qs_seamless_fallback_icon_size"
61        android:layout_height="@dimen/qs_seamless_fallback_icon_size"
62        android:layout_marginEnd="@dimen/qs_seamless_fallback_end_margin"
63        android:layout_marginStart="@dimen/qs_center_guideline_padding"
64        android:alpha="0.5"
65        android:visibility="gone"
66        app:layout_constraintHorizontal_bias="1"
67        app:layout_constraintEnd_toEndOf="parent"
68        app:layout_constraintTop_toTopOf="@id/app_name"
69        app:layout_constraintBottom_toBottomOf="@id/app_name"
70        app:layout_constraintStart_toEndOf="@id/center_vertical_guideline"
71        />
72
73    <Constraint
74        android:id="@+id/album_art"
75        android:layout_width="@dimen/qs_media_album_size"
76        android:layout_height="@dimen/qs_media_album_size"
77        android:layout_marginTop="16dp"
78        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
79        android:layout_marginBottom="24dp"
80        app:layout_constraintTop_toBottomOf="@id/icon"
81        app:layout_constraintStart_toStartOf="parent"
82        app:layout_constraintBottom_toBottomOf="parent"
83        />
84
85    <!-- Song name -->
86    <Constraint
87        android:id="@+id/header_title"
88        android:layout_width="wrap_content"
89        android:layout_height="wrap_content"
90        android:layout_marginTop="17dp"
91        android:layout_marginStart="16dp"
92        app:layout_constrainedWidth="true"
93        app:layout_constraintTop_toBottomOf="@id/app_name"
94        app:layout_constraintBottom_toTopOf="@id/header_artist"
95        app:layout_constraintStart_toEndOf="@id/album_art"
96        app:layout_constraintEnd_toStartOf="@id/media_action_barrier"
97        app:layout_constraintHorizontal_bias="0"/>
98
99    <!-- Artist name -->
100    <Constraint
101        android:id="@+id/header_artist"
102        android:layout_width="wrap_content"
103        android:layout_height="wrap_content"
104        android:layout_marginTop="3dp"
105        android:layout_marginBottom="24dp"
106        app:layout_constrainedWidth="true"
107        app:layout_constraintTop_toBottomOf="@id/header_title"
108        app:layout_constraintStart_toStartOf="@id/header_title"
109        app:layout_constraintEnd_toStartOf="@id/media_action_barrier"
110        app:layout_constraintBottom_toBottomOf="parent"
111        app:layout_constraintHorizontal_bias="0"/>
112
113    <!-- Seek Bar -->
114    <Constraint
115        android:id="@+id/media_progress_bar"
116        android:layout_width="0dp"
117        android:layout_height="wrap_content"
118        android:alpha="0.0"
119        app:layout_constraintTop_toBottomOf="@id/album_art"
120        app:layout_constraintStart_toStartOf="parent"
121        app:layout_constraintEnd_toEndOf="parent"
122        android:visibility="gone"
123        />
124
125    <Constraint
126        android:id="@+id/notification_media_progress_time"
127        android:alpha="0.0"
128        android:layout_width="0dp"
129        android:layout_height="wrap_content"
130        android:layout_marginTop="35dp"
131        android:layout_marginEnd="@dimen/qs_media_panel_outer_padding"
132        android:layout_marginStart="@dimen/qs_media_panel_outer_padding"
133        app:layout_constraintTop_toBottomOf="@id/album_art"
134        app:layout_constraintStart_toStartOf="parent"
135        app:layout_constraintEnd_toEndOf="parent"
136        android:visibility="gone"
137        />
138
139    <Constraint
140        android:id="@+id/action0"
141        android:layout_width="48dp"
142        android:layout_height="48dp"
143        android:layout_marginStart="4dp"
144        android:layout_marginEnd="4dp"
145        android:layout_marginTop="18dp"
146        android:visibility="gone"
147        app:layout_constraintHorizontal_chainStyle="packed"
148        app:layout_constraintTop_toBottomOf="@id/app_name"
149        app:layout_constraintLeft_toLeftOf="parent"
150        app:layout_constraintRight_toLeftOf="@id/action1"
151        app:layout_constraintHorizontal_bias="1"
152        >
153    </Constraint>
154
155    <Constraint
156        android:id="@+id/action1"
157        android:layout_width="48dp"
158        android:layout_height="48dp"
159        android:layout_marginStart="4dp"
160        android:layout_marginEnd="4dp"
161        android:layout_marginTop="18dp"
162        app:layout_constraintTop_toBottomOf="@id/app_name"
163        app:layout_constraintLeft_toRightOf="@id/action0"
164        app:layout_constraintRight_toLeftOf="@id/action2"
165        >
166    </Constraint>
167
168    <Constraint
169        android:id="@+id/action2"
170        android:layout_width="48dp"
171        android:layout_height="48dp"
172        android:layout_marginStart="4dp"
173        android:layout_marginEnd="4dp"
174        android:layout_marginTop="18dp"
175        app:layout_constraintTop_toBottomOf="@id/app_name"
176        app:layout_constraintLeft_toRightOf="@id/action1"
177        app:layout_constraintRight_toLeftOf="@id/action3"
178        >
179    </Constraint>
180
181    <Constraint
182        android:id="@+id/action3"
183        android:layout_width="48dp"
184        android:layout_height="48dp"
185        android:layout_marginStart="4dp"
186        android:layout_marginEnd="4dp"
187        android:layout_marginTop="18dp"
188        app:layout_constraintTop_toBottomOf="@id/app_name"
189        app:layout_constraintLeft_toRightOf="@id/action2"
190        app:layout_constraintRight_toLeftOf="@id/action4"
191        >
192    </Constraint>
193
194    <Constraint
195        android:id="@+id/action4"
196        android:layout_width="48dp"
197        android:layout_height="48dp"
198        android:layout_marginStart="4dp"
199        android:layout_marginEnd="4dp"
200        android:visibility="gone"
201        android:layout_marginTop="18dp"
202        app:layout_constraintHorizontal_chainStyle="packed"
203        app:layout_constraintTop_toBottomOf="@id/app_name"
204        app:layout_constraintLeft_toRightOf="@id/action3"
205        app:layout_constraintRight_toRightOf="parent"
206        app:layout_constraintHorizontal_bias="0"
207        >
208    </Constraint>
209</ConstraintSet>
210