1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2022 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 21 <Constraint 22 android:id="@+id/album_art" 23 android:layout_width="match_parent" 24 android:layout_height="@dimen/qs_media_session_height_expanded" 25 app:layout_constraintStart_toStartOf="parent" 26 app:layout_constraintEnd_toEndOf="parent" 27 app:layout_constraintTop_toTopOf="parent" 28 app:layout_constraintBottom_toBottomOf="parent" /> 29 30 <!-- Touch ripple must have the same constraint as the album art. --> 31 <Constraint 32 android:id="@+id/touch_ripple_view" 33 android:layout_width="match_parent" 34 android:layout_height="@dimen/qs_media_session_height_expanded" 35 app:layout_constraintStart_toStartOf="@+id/album_art" 36 app:layout_constraintEnd_toEndOf="@+id/album_art" 37 app:layout_constraintTop_toTopOf="@+id/album_art" 38 app:layout_constraintBottom_toBottomOf="@+id/album_art" /> 39 40 <!-- Turbulence noise must have the same constraint as the album art. --> 41 <Constraint 42 android:id="@+id/turbulence_noise_view" 43 android:layout_width="match_parent" 44 android:layout_height="@dimen/qs_media_session_height_expanded" 45 app:layout_constraintStart_toStartOf="@+id/album_art" 46 app:layout_constraintEnd_toEndOf="@+id/album_art" 47 app:layout_constraintTop_toTopOf="@+id/album_art" 48 app:layout_constraintBottom_toBottomOf="@+id/album_art" /> 49 50 <Constraint 51 android:id="@+id/loading_effect_view" 52 android:layout_width="match_parent" 53 android:layout_height="@dimen/qs_media_session_height_expanded" 54 app:layout_constraintStart_toStartOf="@+id/album_art" 55 app:layout_constraintEnd_toEndOf="@+id/album_art" 56 app:layout_constraintTop_toTopOf="@+id/album_art" 57 app:layout_constraintBottom_toBottomOf="@+id/album_art" /> 58 59 <Constraint 60 android:id="@+id/header_title" 61 android:layout_width="wrap_content" 62 android:layout_height="wrap_content" 63 android:layout_marginStart="@dimen/qs_media_padding" 64 android:layout_marginEnd="@dimen/qs_media_padding" 65 app:layout_constraintEnd_toStartOf="@id/actionPlayPause" 66 app:layout_constraintTop_toBottomOf="@id/media_seamless" 67 app:layout_constrainedWidth="true" 68 app:layout_constraintStart_toStartOf="parent" 69 app:layout_constraintBottom_toTopOf="@id/header_artist" 70 app:layout_constraintHorizontal_bias="0" 71 app:layout_constraintVertical_bias="1" /> 72 73 <Constraint 74 android:id="@+id/media_explicit_indicator" 75 android:layout_width="wrap_content" 76 android:layout_height="wrap_content" 77 android:layout_marginEnd="@dimen/qs_media_info_spacing" 78 android:layout_marginBottom="@dimen/qs_media_padding" 79 android:layout_marginTop="0dp" 80 app:layout_constraintStart_toStartOf="@id/header_title" 81 app:layout_constraintEnd_toStartOf="@id/header_artist" 82 app:layout_constraintTop_toTopOf="@id/header_artist" 83 app:layout_constraintBottom_toTopOf="@id/media_action_barrier_top" 84 app:layout_constraintHorizontal_bias="0" 85 app:layout_constraintHorizontal_chainStyle="packed"/> 86 87 <Constraint 88 android:id="@+id/header_artist" 89 android:layout_width="wrap_content" 90 android:layout_height="wrap_content" 91 android:layout_marginEnd="@dimen/qs_media_padding" 92 android:layout_marginBottom="@dimen/qs_media_padding" 93 android:layout_marginTop="0dp" 94 app:layout_constrainedWidth="true" 95 app:layout_constraintEnd_toStartOf="@id/actionPlayPause" 96 app:layout_constraintStart_toEndOf="@id/media_explicit_indicator" 97 app:layout_constraintBottom_toTopOf="@id/media_action_barrier_top" 98 app:layout_constraintVertical_bias="0" /> 99 100 <Constraint 101 android:id="@+id/actionPlayPause" 102 android:layout_width="48dp" 103 android:layout_height="48dp" 104 android:layout_marginStart="@dimen/qs_media_padding" 105 android:layout_marginEnd="@dimen/qs_media_padding" 106 android:layout_marginBottom="@dimen/qs_media_padding" 107 app:layout_constraintEnd_toEndOf="parent" 108 app:layout_constraintBottom_toTopOf="@id/media_action_barrier_top" /> 109 110 <!-- 111 The bottom row of action buttons should remain in the same order when RTL, so their constraints 112 are set with right/left instead of start/end. 113 The chain is set to "spread" so that the progress bar can be weighted to fill any empty space. 114 --> 115 <Constraint 116 android:id="@+id/actionPrev" 117 android:layout_width="48dp" 118 android:layout_height="48dp" 119 app:layout_constraintLeft_toLeftOf="parent" 120 app:layout_constraintBottom_toBottomOf="parent" 121 app:layout_constraintHorizontal_chainStyle="spread" /> 122 123 <Constraint 124 android:id="@+id/media_scrubbing_elapsed_time" 125 android:layout_width="48dp" 126 android:layout_height="48dp" 127 app:layout_constraintLeft_toRightOf="@id/actionPrev" 128 app:layout_constraintBottom_toBottomOf="parent" 129 app:layout_constraintHorizontal_chainStyle="spread" /> 130 131 <Constraint 132 android:id="@+id/media_progress_bar" 133 android:layout_width="0dp" 134 android:layout_height="48dp" 135 app:layout_constraintLeft_toRightOf="@id/media_scrubbing_elapsed_time" 136 app:layout_constraintRight_toLeftOf="@id/actionNext" 137 app:layout_constraintBottom_toBottomOf="parent" 138 app:layout_constraintHorizontal_weight="1" /> 139 140 <Constraint 141 android:id="@+id/actionNext" 142 android:layout_width="48dp" 143 android:layout_height="48dp" 144 app:layout_constraintRight_toLeftOf="@id/media_scrubbing_total_time" 145 app:layout_constraintBottom_toBottomOf="parent" /> 146 147 <Constraint 148 android:id="@+id/media_scrubbing_total_time" 149 android:layout_width="48dp" 150 android:layout_height="48dp" 151 app:layout_constraintRight_toLeftOf="@id/action0" 152 app:layout_constraintBottom_toBottomOf="parent" /> 153 154 <Constraint 155 android:id="@+id/action0" 156 android:layout_width="48dp" 157 android:layout_height="48dp" 158 app:layout_constraintRight_toLeftOf="@id/action1" 159 app:layout_constraintBottom_toBottomOf="parent" /> 160 161 <Constraint 162 android:id="@+id/action1" 163 android:layout_width="48dp" 164 android:layout_height="48dp" 165 app:layout_constraintRight_toLeftOf="@id/action2" 166 app:layout_constraintBottom_toBottomOf="parent" /> 167 168 <Constraint 169 android:id="@+id/action2" 170 android:layout_width="48dp" 171 android:layout_height="48dp" 172 app:layout_constraintRight_toLeftOf="@id/action3" 173 app:layout_constraintBottom_toBottomOf="parent" /> 174 175 <Constraint 176 android:id="@+id/action3" 177 android:layout_width="48dp" 178 android:layout_height="48dp" 179 app:layout_constraintRight_toLeftOf="@id/action4" 180 app:layout_constraintBottom_toBottomOf="parent" /> 181 182 <Constraint 183 android:id="@+id/action4" 184 android:layout_width="48dp" 185 android:layout_height="48dp" 186 app:layout_constraintRight_toRightOf="parent" 187 app:layout_constraintBottom_toBottomOf="parent" /> 188</ConstraintSet> 189