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