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 --> |
Selim Cinek | 2de5ebb | 2020-05-20 15:39:03 -0700 | [diff] [blame] | 19 | <com.android.systemui.util.animation.TransitionLayout xmlns:android="http://schemas.android.com/apk/res/android" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 20 | xmlns:app="http://schemas.android.com/apk/res-auto" |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 21 | android:id="@+id/qs_media_controls" |
| 22 | android:layout_width="match_parent" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 23 | android:layout_height="wrap_content" |
Selim Cinek | f0f7495 | 2020-04-21 11:45:16 -0700 | [diff] [blame] | 24 | android:clipChildren="false" |
| 25 | android:clipToPadding="false" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 26 | android:gravity="center_horizontal|fill_vertical" |
Selim Cinek | 2de5ebb | 2020-05-20 15:39:03 -0700 | [diff] [blame] | 27 | android:background="@drawable/qs_media_background"> |
Selim Cinek | f0f7495 | 2020-04-21 11:45:16 -0700 | [diff] [blame] | 28 | |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 29 | <!-- As per Material Design on Biderectionality, this is forced to LTR in code --> |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 30 | <FrameLayout |
| 31 | android:id="@+id/notification_media_progress_time" |
| 32 | android:layout_width="0dp" |
| 33 | android:layout_height="wrap_content" |
| 34 | android:forceHasOverlappingRendering="false"> |
| 35 | <!-- width is set to "match_parent" to avoid extra layout calls --> |
| 36 | <TextView |
| 37 | android:id="@+id/media_elapsed_time" |
| 38 | android:layout_width="match_parent" |
| 39 | android:layout_height="wrap_content" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 40 | android:layout_alignParentStart="true" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 41 | android:fontFamily="@*android:string/config_bodyFontFamily" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 42 | android:textColor="@color/media_primary_text" |
Robert Snoeberger | 77d3dca | 2020-06-02 17:36:49 -0400 | [diff] [blame] | 43 | android:gravity="start" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 44 | android:textSize="14sp" /> |
| 45 | |
| 46 | <TextView |
| 47 | android:id="@+id/media_total_time" |
| 48 | android:layout_width="match_parent" |
| 49 | android:layout_height="wrap_content" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 50 | android:layout_alignParentEnd="true" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 51 | android:fontFamily="@*android:string/config_bodyFontFamily" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 52 | android:textColor="@color/media_primary_text" |
Robert Snoeberger | 77d3dca | 2020-06-02 17:36:49 -0400 | [diff] [blame] | 53 | android:gravity="end" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 54 | android:textSize="14sp" /> |
| 55 | </FrameLayout> |
| 56 | |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 57 | <!-- Actions must be ordered left-to-right even in RTL layout. However, they appear in a chain |
| 58 | with the album art and the title, and must as a group appear at the end of that chain. This is |
| 59 | accomplished by having the guidebox (an invisible view that is positioned around all 5 actions) |
| 60 | in the chain with the album art and the title. The actions are in a LTR chain bounded by that |
| 61 | guidebox, and the ambiguity of how wide the guidebox should be is resolved by using a barrier |
| 62 | which forces it's starting edge to be as far to the end as possible while fitting the actions. |
| 63 | --> |
| 64 | <androidx.constraintlayout.widget.Barrier |
| 65 | android:id="@+id/media_action_barrier" |
| 66 | android:layout_width="0dp" |
| 67 | android:layout_height="0dp" |
| 68 | android:orientation="vertical" |
| 69 | app:barrierDirection="start" |
| 70 | /> |
| 71 | |
| 72 | <View |
| 73 | android:id="@+id/media_action_guidebox" |
| 74 | android:layout_width="0dp" |
| 75 | android:layout_height="48dp" |
| 76 | android:layout_marginTop="16dp" |
| 77 | android:visibility="invisible" |
| 78 | /> |
| 79 | |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 80 | <ImageButton |
| 81 | android:id="@+id/action0" |
| 82 | style="@style/MediaPlayer.Button" |
| 83 | android:layout_width="48dp" |
| 84 | android:layout_height="48dp" /> |
| 85 | |
| 86 | <ImageButton |
| 87 | android:id="@+id/action1" |
| 88 | style="@style/MediaPlayer.Button" |
| 89 | android:layout_width="48dp" |
| 90 | android:layout_height="48dp" /> |
| 91 | |
| 92 | <ImageButton |
| 93 | android:id="@+id/action2" |
| 94 | style="@style/MediaPlayer.Button" |
| 95 | android:layout_width="52dp" |
| 96 | android:layout_height="52dp" /> |
| 97 | |
| 98 | <ImageButton |
| 99 | android:id="@+id/action3" |
| 100 | style="@style/MediaPlayer.Button" |
| 101 | android:layout_width="48dp" |
| 102 | android:layout_height="48dp" /> |
| 103 | |
| 104 | <ImageButton |
| 105 | android:id="@+id/action4" |
| 106 | style="@style/MediaPlayer.Button" |
| 107 | android:layout_width="48dp" |
| 108 | android:layout_height="48dp" /> |
| 109 | |
| 110 | <!-- Album Art --> |
| 111 | <ImageView |
| 112 | android:id="@+id/album_art" |
| 113 | android:layout_width="@dimen/qs_media_album_size" |
| 114 | android:layout_height="@dimen/qs_media_album_size" /> |
| 115 | |
| 116 | <!-- Seamless Output Switcher --> |
| 117 | <LinearLayout |
| 118 | android:id="@+id/media_seamless" |
| 119 | android:layout_width="0dp" |
| 120 | android:layout_height="wrap_content" |
Fabian Kozynski | 349967a | 2020-06-22 12:18:06 -0400 | [diff] [blame] | 121 | android:foreground="@drawable/qs_media_seamless_background" |
Lucas Dupin | 5feeaca | 2020-05-28 11:01:54 -0700 | [diff] [blame] | 122 | android:background="@drawable/qs_media_light_source" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 123 | android:orientation="horizontal" |
| 124 | android:forceHasOverlappingRendering="false" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 125 | android:paddingStart="12dp" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 126 | android:paddingTop="6dp" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 127 | android:paddingEnd="12dp" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 128 | android:paddingBottom="6dp"> |
| 129 | |
| 130 | <ImageView |
| 131 | android:id="@+id/media_seamless_image" |
| 132 | android:layout_width="@dimen/qs_seamless_icon_size" |
| 133 | android:layout_height="@dimen/qs_seamless_icon_size" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 134 | android:layout_marginEnd="8dp" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 135 | android:tint="@color/media_primary_text" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 136 | android:src="@*android:drawable/ic_media_seamless" /> |
| 137 | |
| 138 | <TextView |
| 139 | android:id="@+id/media_seamless_text" |
| 140 | android:layout_width="wrap_content" |
| 141 | android:layout_height="wrap_content" |
Fabian Kozynski | ed9f305 | 2020-06-22 17:11:03 -0400 | [diff] [blame] | 142 | android:fontFamily="@*android:string/config_headlineFontFamily" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 143 | android:singleLine="true" |
| 144 | android:text="@*android:string/ext_media_seamless_action" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 145 | android:textColor="@color/media_primary_text" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 146 | android:textDirection="locale" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 147 | android:textSize="14sp" /> |
| 148 | </LinearLayout> |
| 149 | |
Robert Snoeberger | 0734043 | 2020-06-19 17:33:48 -0400 | [diff] [blame] | 150 | <ImageView |
| 151 | android:id="@+id/media_seamless_fallback" |
| 152 | android:layout_width="@dimen/qs_seamless_icon_size" |
| 153 | android:layout_height="@dimen/qs_seamless_icon_size" |
| 154 | android:tint="@color/media_primary_text" |
| 155 | android:src="@drawable/ic_cast_connected" |
| 156 | android:forceHasOverlappingRendering="false" /> |
| 157 | |
| 158 | <androidx.constraintlayout.widget.Barrier |
| 159 | android:id="@+id/media_seamless_barrier" |
| 160 | android:layout_width="wrap_content" |
| 161 | android:layout_height="wrap_content" |
| 162 | app:barrierDirection="start" |
| 163 | app:constraint_referenced_ids="media_seamless,media_seamless_fallback" |
| 164 | app:barrierAllowsGoneWidgets="false" |
| 165 | /> |
| 166 | |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 167 | <!-- Seek Bar --> |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 168 | <!-- As per Material Design on Biderectionality, this is forced to LTR in code --> |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 169 | <SeekBar |
| 170 | android:id="@+id/media_progress_bar" |
| 171 | style="@android:style/Widget.ProgressBar.Horizontal" |
| 172 | android:layout_width="0dp" |
| 173 | android:layout_height="wrap_content" |
| 174 | android:clickable="true" |
Fabian Kozynski | 8a9516d | 2020-06-19 17:26:54 -0400 | [diff] [blame] | 175 | android:maxHeight="@dimen/qs_media_enabled_seekbar_height" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 176 | android:paddingTop="16dp" |
| 177 | android:paddingBottom="16dp" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 178 | android:thumbTint="@color/media_primary_text" |
| 179 | android:progressTint="@color/media_seekbar_progress" |
| 180 | android:progressBackgroundTint="@color/media_disabled" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 181 | android:splitTrack="false" /> |
| 182 | |
| 183 | <!-- App name --> |
| 184 | <TextView |
| 185 | android:id="@+id/app_name" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 186 | android:textColor="@color/media_primary_text" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 187 | android:layout_width="0dp" |
| 188 | android:layout_height="wrap_content" |
| 189 | android:singleLine="true" |
Fabian Kozynski | ed9f305 | 2020-06-22 17:11:03 -0400 | [diff] [blame] | 190 | android:fontFamily="@*android:string/config_headlineFontFamily" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 191 | android:textDirection="locale" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 192 | android:textSize="14sp" /> |
| 193 | |
| 194 | <!-- Song name --> |
| 195 | <TextView |
| 196 | android:id="@+id/header_title" |
| 197 | android:layout_width="wrap_content" |
| 198 | android:layout_height="wrap_content" |
| 199 | android:fontFamily="@*android:string/config_headlineFontFamilyMedium" |
| 200 | android:singleLine="true" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 201 | android:textColor="@color/media_primary_text" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 202 | android:textDirection="locale" |
Fabian Kozynski | 399928f | 2020-06-19 15:41:45 -0400 | [diff] [blame] | 203 | android:textSize="16sp" /> |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 204 | |
| 205 | <!-- Artist name --> |
| 206 | <TextView |
| 207 | android:id="@+id/header_artist" |
| 208 | android:layout_width="wrap_content" |
| 209 | android:layout_height="wrap_content" |
Fabian Kozynski | ed9f305 | 2020-06-22 17:11:03 -0400 | [diff] [blame] | 210 | android:fontFamily="@*android:string/config_headlineFontFamily" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 211 | android:singleLine="true" |
Fabian Kozynski | 2828fc6 | 2020-06-19 15:56:58 -0400 | [diff] [blame] | 212 | android:textColor="@color/media_secondary_text" |
Jeff DeCew | afec78f | 2020-06-12 13:57:23 -0400 | [diff] [blame] | 213 | android:textDirection="locale" |
Selim Cinek | d835792 | 2020-04-10 15:06:53 -0700 | [diff] [blame] | 214 | android:textSize="14sp" /> |
| 215 | |
| 216 | <com.android.internal.widget.CachingIconView |
| 217 | android:id="@+id/icon" |
Lucas Dupin | 81e9beb | 2020-05-14 19:28:36 -0700 | [diff] [blame] | 218 | android:tint="@color/media_primary_text" |
Fabian Kozynski | ed9f305 | 2020-06-22 17:11:03 -0400 | [diff] [blame] | 219 | android:layout_width="20dp" |
| 220 | android:layout_height="20dp" /> |
Beth Thibodeau | 07d20c3 | 2019-10-16 13:45:56 -0400 | [diff] [blame] | 221 | |
Beth Thibodeau | 8ebf6ad | 2020-03-18 20:01:27 -0400 | [diff] [blame] | 222 | <!-- Buttons to remove this view when no longer needed --> |
| 223 | <include |
| 224 | layout="@layout/qs_media_panel_options" |
Selim Cinek | 2de5ebb | 2020-05-20 15:39:03 -0700 | [diff] [blame] | 225 | android:visibility="gone" /> |
| 226 | </com.android.systemui.util.animation.TransitionLayout> |