• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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:translationY="@dimen/qs_media_icon_offset"
25        android:translationX="@dimen/qs_media_icon_offset"
26        app:layout_constraintEnd_toEndOf="@id/album_art"
27        app:layout_constraintBottom_toBottomOf="@id/album_art"
28        />
29
30    <Constraint
31        android:id="@+id/media_seamless"
32        android:layout_width="wrap_content"
33        android:layout_height="48dp"
34        app:layout_constraintEnd_toEndOf="parent"
35        app:layout_constraintTop_toTopOf="parent"
36        app:layout_constraintStart_toEndOf="@id/center_vertical_guideline"
37        app:layout_constraintBottom_toTopOf="@id/center_horizontal_guideline"
38        app:layout_constraintHorizontal_chainStyle="spread_inside"
39        app:layout_constraintHorizontal_bias="1"
40        app:layout_constrainedWidth="true"
41        app:layout_constraintWidth_min="48dp"
42        app:layout_constraintHeight_min="48dp"
43        android:layout_marginStart="@dimen/qs_center_guideline_padding"
44        />
45
46    <Constraint
47        android:id="@+id/media_seamless_fallback"
48        android:layout_width="@dimen/qs_seamless_fallback_icon_size"
49        android:layout_height="@dimen/qs_seamless_fallback_icon_size"
50        android:layout_marginTop="@dimen/qs_media_padding"
51        android:layout_marginBottom="@dimen/qs_media_padding"
52        android:layout_marginStart="@dimen/qs_center_guideline_padding"
53        android:layout_marginEnd="@dimen/qs_seamless_fallback_margin"
54        android:alpha="0.5"
55        android:visibility="gone"
56        app:layout_constraintHorizontal_bias="1"
57        app:layout_constraintTop_toTopOf="parent"
58        app:layout_constraintBottom_toTopOf="@id/center_horizontal_guideline"
59        app:layout_constraintStart_toEndOf="@id/center_vertical_guideline"
60        app:layout_constraintEnd_toEndOf="parent"
61        />
62
63    <Constraint
64        android:id="@+id/album_art"
65        android:layout_width="@dimen/qs_media_album_size_small"
66        android:layout_height="@dimen/qs_media_album_size_small"
67        android:layout_marginTop="@dimen/qs_media_padding"
68        android:layout_marginStart="@dimen/qs_media_padding"
69        android:layout_marginBottom="@dimen/qs_media_padding"
70        app:layout_constraintTop_toTopOf="parent"
71        app:layout_constraintStart_toStartOf="parent"
72        app:layout_constraintBottom_toBottomOf="parent"
73        />
74
75    <!-- Song name -->
76    <Constraint
77        android:id="@+id/header_title"
78        android:layout_width="0dp"
79        android:layout_height="wrap_content"
80        android:layout_marginStart="@dimen/qs_media_info_margin"
81        android:layout_marginEnd="@dimen/qs_center_guideline_padding"
82        app:layout_constrainedWidth="true"
83        app:layout_constraintBottom_toTopOf="@id/center_horizontal_guideline"
84        app:layout_constraintStart_toEndOf="@id/album_art"
85        app:layout_constraintEnd_toStartOf="@id/center_vertical_guideline"
86        app:layout_constraintHorizontal_bias="0"/>
87
88    <!-- Artist name -->
89    <Constraint
90        android:id="@+id/header_artist"
91        android:layout_width="0dp"
92        android:layout_height="wrap_content"
93        app:layout_constrainedWidth="true"
94        android:layout_marginTop="@dimen/qs_media_info_spacing"
95        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
96        app:layout_constraintStart_toStartOf="@id/header_title"
97        app:layout_constraintEnd_toStartOf="@id/media_action_barrier"
98        app:layout_constraintHorizontal_bias="0"/>
99
100    <!-- Seek Bar -->
101    <Constraint
102        android:id="@+id/media_progress_bar"
103        android:layout_width="0dp"
104        android:layout_height="wrap_content"
105        android:alpha="0.0"
106        app:layout_constraintTop_toBottomOf="@id/album_art"
107        app:layout_constraintStart_toStartOf="parent"
108        app:layout_constraintEnd_toEndOf="parent"
109        android:visibility="gone"
110        />
111
112    <Constraint
113        android:id="@+id/notification_media_progress_time"
114        android:alpha="0.0"
115        android:layout_width="0dp"
116        android:layout_height="wrap_content"
117        app:layout_constraintTop_toBottomOf="@id/album_art"
118        app:layout_constraintStart_toStartOf="parent"
119        app:layout_constraintEnd_toEndOf="parent"
120        android:visibility="gone"
121        />
122
123    <Constraint
124        android:id="@+id/action0"
125        android:layout_width="48dp"
126        android:layout_height="48dp"
127        android:layout_marginStart="@dimen/qs_media_padding"
128        android:layout_marginEnd="@dimen/qs_media_action_spacing"
129        android:visibility="gone"
130        app:layout_constraintHorizontal_chainStyle="packed"
131        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
132        app:layout_constraintBottom_toBottomOf="parent"
133        app:layout_constraintLeft_toLeftOf="parent"
134        app:layout_constraintRight_toLeftOf="@id/action1"
135        app:layout_constraintHorizontal_bias="1"
136        >
137    </Constraint>
138
139    <Constraint
140        android:id="@+id/action1"
141        android:layout_width="48dp"
142        android:layout_height="48dp"
143        android:layout_marginStart="@dimen/qs_media_action_spacing"
144        android:layout_marginEnd="@dimen/qs_media_action_spacing"
145        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
146        app:layout_constraintBottom_toBottomOf="parent"
147        app:layout_constraintLeft_toRightOf="@id/action0"
148        app:layout_constraintRight_toLeftOf="@id/action2"
149        >
150    </Constraint>
151
152    <Constraint
153        android:id="@+id/action2"
154        android:layout_width="48dp"
155        android:layout_height="48dp"
156        android:layout_marginStart="@dimen/qs_media_action_spacing"
157        android:layout_marginEnd="@dimen/qs_media_action_spacing"
158        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
159        app:layout_constraintBottom_toBottomOf="parent"
160        app:layout_constraintLeft_toRightOf="@id/action1"
161        app:layout_constraintRight_toLeftOf="@id/action3"
162        >
163    </Constraint>
164
165    <Constraint
166        android:id="@+id/action3"
167        android:layout_width="48dp"
168        android:layout_height="48dp"
169        android:layout_marginStart="@dimen/qs_media_action_spacing"
170        android:layout_marginEnd="@dimen/qs_media_action_spacing"
171        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
172        app:layout_constraintBottom_toBottomOf="parent"
173        app:layout_constraintLeft_toRightOf="@id/action2"
174        app:layout_constraintRight_toLeftOf="@id/action4"
175        >
176    </Constraint>
177
178    <Constraint
179        android:id="@+id/action4"
180        android:layout_width="48dp"
181        android:layout_height="48dp"
182        android:layout_marginStart="@dimen/qs_media_action_spacing"
183        android:layout_marginEnd="@dimen/qs_media_padding"
184        android:visibility="gone"
185        app:layout_constraintHorizontal_chainStyle="packed"
186        app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline"
187        app:layout_constraintBottom_toBottomOf="parent"
188        app:layout_constraintLeft_toRightOf="@id/action3"
189        app:layout_constraintRight_toRightOf="parent"
190        app:layout_constraintHorizontal_bias="0"
191        >
192    </Constraint>
193</ConstraintSet>
194