Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- |
| 3 | ~ Copyright (C) 2019 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 | |
| 18 | <!-- Layout for media controls inside QSPanel carousel --> |
| 19 | <LinearLayout |
| 20 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 21 | android:id="@+id/qs_media_controls" |
| 22 | android:layout_width="match_parent" |
| 23 | android:layout_height="match_parent" |
| 24 | android:orientation="vertical" |
| 25 | android:gravity="center_horizontal|fill_vertical" |
Robert Snoeberger | a9b8d7f | 2020-04-07 17:44:51 -0400 | [diff] [blame] | 26 | android:paddingTop="@dimen/qs_media_panel_outer_padding" |
| 27 | android:paddingBottom="@dimen/qs_media_panel_outer_padding" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 28 | android:background="@drawable/qs_media_background" |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 29 | > |
| 30 | |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 31 | <!-- Buttons to remove this view when no longer needed --> |
| 32 | <include |
| 33 | layout="@layout/qs_media_panel_options" |
| 34 | android:visibility="gone"/> |
| 35 | |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 36 | <LinearLayout |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 37 | android:id="@+id/media_guts" |
| 38 | android:orientation="vertical" |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 39 | android:layout_width="match_parent" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 40 | android:layout_height="match_parent"> |
| 41 | <!-- Header section --> |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 42 | <LinearLayout |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 43 | android:orientation="horizontal" |
| 44 | android:layout_width="match_parent" |
| 45 | android:layout_height="wrap_content" |
Robert Snoeberger | a9b8d7f | 2020-04-07 17:44:51 -0400 | [diff] [blame] | 46 | android:layout_marginBottom="@dimen/qs_media_panel_outer_padding" |
| 47 | android:paddingStart="@dimen/qs_media_panel_outer_padding" |
| 48 | android:paddingEnd="16dp" |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 49 | > |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 50 | |
| 51 | <ImageView |
| 52 | android:id="@+id/album_art" |
| 53 | android:layout_width="@dimen/qs_media_album_size" |
| 54 | android:layout_height="@dimen/qs_media_album_size" |
| 55 | android:layout_marginRight="16dp" |
| 56 | android:layout_weight="0" |
| 57 | /> |
| 58 | |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 59 | <LinearLayout |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 60 | android:orientation="vertical" |
| 61 | android:layout_width="0dp" |
Robert Snoeberger | 5430412 | 2020-03-24 15:53:44 -0400 | [diff] [blame] | 62 | android:layout_height="wrap_content" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 63 | android:layout_weight="1" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 64 | > |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 65 | <LinearLayout |
| 66 | android:orientation="horizontal" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 67 | android:layout_width="wrap_content" |
| 68 | android:layout_height="wrap_content" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 69 | android:gravity="center" |
| 70 | > |
| 71 | <com.android.internal.widget.CachingIconView |
| 72 | android:id="@+id/icon" |
| 73 | android:layout_width="16dp" |
| 74 | android:layout_height="16dp" |
| 75 | android:layout_marginEnd="5dp" |
| 76 | /> |
| 77 | <TextView |
| 78 | android:id="@+id/app_name" |
| 79 | android:layout_width="wrap_content" |
| 80 | android:layout_height="wrap_content" |
| 81 | android:textSize="14sp" |
| 82 | android:singleLine="true" |
| 83 | /> |
| 84 | </LinearLayout> |
| 85 | |
| 86 | <!-- Song name --> |
| 87 | <TextView |
| 88 | android:id="@+id/header_title" |
| 89 | android:layout_width="wrap_content" |
| 90 | android:layout_height="wrap_content" |
| 91 | android:singleLine="true" |
| 92 | android:fontFamily="@*android:string/config_headlineFontFamilyMedium" |
| 93 | android:textSize="18sp" |
| 94 | android:paddingBottom="6dp" |
| 95 | android:gravity="center"/> |
| 96 | |
| 97 | <!-- Artist name --> |
| 98 | <TextView |
| 99 | android:id="@+id/header_artist" |
| 100 | android:layout_width="wrap_content" |
| 101 | android:layout_height="wrap_content" |
| 102 | android:fontFamily="@*android:string/config_bodyFontFamily" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 103 | android:textSize="14sp" |
| 104 | android:singleLine="true" |
| 105 | /> |
| 106 | </LinearLayout> |
| 107 | |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 108 | <!-- Output chip --> |
| 109 | <LinearLayout |
| 110 | android:layout_width="0dp" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 111 | android:layout_height="wrap_content" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 112 | android:orientation="horizontal" |
| 113 | android:visibility="gone" |
| 114 | android:paddingTop="6dp" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 115 | android:paddingBottom="6dp" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 116 | android:paddingLeft="12dp" |
| 117 | android:paddingRight="12dp" |
| 118 | android:gravity="center" |
| 119 | android:id="@+id/media_seamless" |
| 120 | android:background="@*android:drawable/media_seamless_background" |
| 121 | android:layout_weight="1" |
Robert Snoeberger | c981dc9 | 2020-04-27 15:00:50 -0400 | [diff] [blame^] | 122 | android:forceHasOverlappingRendering="false" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 123 | > |
| 124 | <ImageView |
| 125 | android:layout_width="@dimen/qs_seamless_icon_size" |
| 126 | android:layout_height="@dimen/qs_seamless_icon_size" |
| 127 | android:src="@*android:drawable/ic_media_seamless" |
| 128 | android:layout_marginRight="8dp" |
| 129 | android:id="@+id/media_seamless_image" |
| 130 | /> |
| 131 | <TextView |
| 132 | android:layout_width="wrap_content" |
| 133 | android:layout_height="wrap_content" |
| 134 | android:fontFamily="@*android:string/config_bodyFontFamily" |
| 135 | android:text="@*android:string/ext_media_seamless_action" |
| 136 | android:textSize="14sp" |
| 137 | android:id="@+id/media_seamless_text" |
| 138 | android:singleLine="true" |
| 139 | /> |
| 140 | </LinearLayout> |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 141 | </LinearLayout> |
| 142 | |
Robert Snoeberger | 7dffd37 | 2020-04-01 17:32:44 -0400 | [diff] [blame] | 143 | <!-- Seek Bar --> |
| 144 | <SeekBar |
| 145 | android:id="@+id/media_progress_bar" |
Robert Snoeberger | a9b8d7f | 2020-04-07 17:44:51 -0400 | [diff] [blame] | 146 | style="@android:style/Widget.ProgressBar.Horizontal" |
Robert Snoeberger | 7dffd37 | 2020-04-01 17:32:44 -0400 | [diff] [blame] | 147 | android:clickable="true" |
| 148 | android:layout_width="match_parent" |
| 149 | android:layout_height="wrap_content" |
| 150 | android:maxHeight="3dp" |
| 151 | android:paddingTop="24dp" |
| 152 | android:paddingBottom="24dp" |
| 153 | android:layout_marginBottom="-24dp" |
| 154 | android:layout_marginTop="-24dp" |
| 155 | android:splitTrack="false" |
| 156 | /> |
| 157 | |
| 158 | <FrameLayout |
| 159 | android:id="@+id/notification_media_progress_time" |
| 160 | android:layout_width="match_parent" |
| 161 | android:layout_height="wrap_content" |
Robert Snoeberger | a9b8d7f | 2020-04-07 17:44:51 -0400 | [diff] [blame] | 162 | android:paddingStart="@dimen/qs_media_panel_outer_padding" |
| 163 | android:paddingEnd="@dimen/qs_media_panel_outer_padding" |
| 164 | android:layout_marginBottom="10dp" |
Robert Snoeberger | 7dffd37 | 2020-04-01 17:32:44 -0400 | [diff] [blame] | 165 | android:layout_gravity="center" |
| 166 | > |
| 167 | <!-- width is set to "match_parent" to avoid extra layout calls --> |
| 168 | <TextView |
| 169 | android:id="@+id/media_elapsed_time" |
| 170 | android:layout_width="match_parent" |
| 171 | android:layout_height="wrap_content" |
| 172 | android:layout_alignParentLeft="true" |
| 173 | android:fontFamily="@*android:string/config_bodyFontFamily" |
| 174 | android:textSize="14sp" |
| 175 | android:gravity="left" |
| 176 | /> |
| 177 | <TextView |
| 178 | android:id="@+id/media_total_time" |
| 179 | android:layout_width="match_parent" |
| 180 | android:layout_height="wrap_content" |
| 181 | android:fontFamily="@*android:string/config_bodyFontFamily" |
| 182 | android:layout_alignParentRight="true" |
| 183 | android:textSize="14sp" |
| 184 | android:gravity="right" |
| 185 | /> |
| 186 | </FrameLayout> |
| 187 | |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 188 | <!-- Controls --> |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 189 | <LinearLayout |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 190 | android:id="@+id/media_actions" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 191 | android:orientation="horizontal" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 192 | android:layoutDirection="ltr" |
| 193 | android:layout_width="match_parent" |
| 194 | android:layout_height="wrap_content" |
Robert Snoeberger | a9b8d7f | 2020-04-07 17:44:51 -0400 | [diff] [blame] | 195 | android:paddingStart="@dimen/qs_media_panel_outer_padding" |
| 196 | android:paddingEnd="@dimen/qs_media_panel_outer_padding" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 197 | android:gravity="center" |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 198 | > |
| 199 | <ImageButton |
| 200 | style="@android:style/Widget.Material.Button.Borderless.Small" |
| 201 | android:layout_width="48dp" |
| 202 | android:layout_height="48dp" |
| 203 | android:layout_marginStart="8dp" |
| 204 | android:layout_marginEnd="8dp" |
| 205 | android:gravity="center" |
| 206 | android:visibility="gone" |
| 207 | android:id="@+id/action0" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 208 | /> |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 209 | <ImageButton |
| 210 | style="@android:style/Widget.Material.Button.Borderless.Small" |
| 211 | android:layout_width="48dp" |
| 212 | android:layout_height="48dp" |
| 213 | android:layout_marginStart="8dp" |
| 214 | android:layout_marginEnd="8dp" |
| 215 | android:gravity="center" |
| 216 | android:visibility="gone" |
| 217 | android:id="@+id/action1" |
| 218 | /> |
| 219 | <ImageButton |
| 220 | style="@android:style/Widget.Material.Button.Borderless.Small" |
| 221 | android:layout_width="52dp" |
| 222 | android:layout_height="52dp" |
| 223 | android:layout_marginStart="8dp" |
| 224 | android:layout_marginEnd="8dp" |
| 225 | android:gravity="center" |
| 226 | android:visibility="gone" |
| 227 | android:id="@+id/action2" |
| 228 | /> |
| 229 | <ImageButton |
| 230 | style="@android:style/Widget.Material.Button.Borderless.Small" |
| 231 | android:layout_width="48dp" |
| 232 | android:layout_height="48dp" |
| 233 | android:layout_marginStart="8dp" |
| 234 | android:layout_marginEnd="8dp" |
| 235 | android:gravity="center" |
| 236 | android:visibility="gone" |
| 237 | android:id="@+id/action3" |
| 238 | /> |
| 239 | <ImageButton |
| 240 | style="@android:style/Widget.Material.Button.Borderless.Small" |
| 241 | android:layout_width="48dp" |
| 242 | android:layout_height="48dp" |
| 243 | android:layout_marginStart="8dp" |
| 244 | android:layout_marginEnd="8dp" |
| 245 | android:gravity="center" |
| 246 | android:visibility="gone" |
| 247 | android:id="@+id/action4" |
Beth Thibodeau | 8cb6d42 | 2020-01-31 14:57:09 -0500 | [diff] [blame] | 248 | /> |
| 249 | </LinearLayout> |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 250 | </LinearLayout> |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 251 | </LinearLayout> |