blob: a194569dcca4f8f00cc2f5cf15dbfe202e030b39 [file] [log] [blame]
Beth Thibodeau07d20c32019-10-16 13:45:56 -04001<?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 Snoebergera9b8d7f2020-04-07 17:44:51 -040026 android:paddingTop="@dimen/qs_media_panel_outer_padding"
27 android:paddingBottom="@dimen/qs_media_panel_outer_padding"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -050028 android:background="@drawable/qs_media_background"
Beth Thibodeau07d20c32019-10-16 13:45:56 -040029 >
30
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040031 <!-- Buttons to remove this view when no longer needed -->
32 <include
33 layout="@layout/qs_media_panel_options"
34 android:visibility="gone"/>
35
Beth Thibodeau07d20c32019-10-16 13:45:56 -040036 <LinearLayout
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040037 android:id="@+id/media_guts"
38 android:orientation="vertical"
Beth Thibodeau07d20c32019-10-16 13:45:56 -040039 android:layout_width="match_parent"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040040 android:layout_height="match_parent">
41 <!-- Header section -->
Beth Thibodeau8cb6d422020-01-31 14:57:09 -050042 <LinearLayout
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040043 android:orientation="horizontal"
44 android:layout_width="match_parent"
45 android:layout_height="wrap_content"
Robert Snoebergera9b8d7f2020-04-07 17:44:51 -040046 android:layout_marginBottom="@dimen/qs_media_panel_outer_padding"
47 android:paddingStart="@dimen/qs_media_panel_outer_padding"
48 android:paddingEnd="16dp"
Beth Thibodeau07d20c32019-10-16 13:45:56 -040049 >
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040050
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 Thibodeau8cb6d422020-01-31 14:57:09 -050059 <LinearLayout
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040060 android:orientation="vertical"
61 android:layout_width="0dp"
Robert Snoeberger54304122020-03-24 15:53:44 -040062 android:layout_height="wrap_content"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040063 android:layout_weight="1"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -050064 >
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040065 <LinearLayout
66 android:orientation="horizontal"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -050067 android:layout_width="wrap_content"
68 android:layout_height="wrap_content"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -040069 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 Thibodeau8cb6d422020-01-31 14:57:09 -0500103 android:textSize="14sp"
104 android:singleLine="true"
105 />
106 </LinearLayout>
107
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400108 <!-- Output chip -->
109 <LinearLayout
110 android:layout_width="0dp"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -0500111 android:layout_height="wrap_content"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400112 android:orientation="horizontal"
113 android:visibility="gone"
114 android:paddingTop="6dp"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -0500115 android:paddingBottom="6dp"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400116 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 Snoebergerc981dc92020-04-27 15:00:50 -0400122 android:forceHasOverlappingRendering="false"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400123 >
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 Thibodeau8cb6d422020-01-31 14:57:09 -0500141 </LinearLayout>
142
Robert Snoeberger7dffd372020-04-01 17:32:44 -0400143 <!-- Seek Bar -->
144 <SeekBar
145 android:id="@+id/media_progress_bar"
Robert Snoebergera9b8d7f2020-04-07 17:44:51 -0400146 style="@android:style/Widget.ProgressBar.Horizontal"
Robert Snoeberger7dffd372020-04-01 17:32:44 -0400147 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 Snoebergera9b8d7f2020-04-07 17:44:51 -0400162 android:paddingStart="@dimen/qs_media_panel_outer_padding"
163 android:paddingEnd="@dimen/qs_media_panel_outer_padding"
164 android:layout_marginBottom="10dp"
Robert Snoeberger7dffd372020-04-01 17:32:44 -0400165 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 Thibodeau8ebf6ad2020-03-18 20:01:27 -0400188 <!-- Controls -->
Beth Thibodeau8cb6d422020-01-31 14:57:09 -0500189 <LinearLayout
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400190 android:id="@+id/media_actions"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -0500191 android:orientation="horizontal"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400192 android:layoutDirection="ltr"
193 android:layout_width="match_parent"
194 android:layout_height="wrap_content"
Robert Snoebergera9b8d7f2020-04-07 17:44:51 -0400195 android:paddingStart="@dimen/qs_media_panel_outer_padding"
196 android:paddingEnd="@dimen/qs_media_panel_outer_padding"
Beth Thibodeau8cb6d422020-01-31 14:57:09 -0500197 android:gravity="center"
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400198 >
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 Thibodeau8cb6d422020-01-31 14:57:09 -0500208 />
Beth Thibodeau8ebf6ad2020-03-18 20:01:27 -0400209 <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 Thibodeau8cb6d422020-01-31 14:57:09 -0500248 />
249 </LinearLayout>
Beth Thibodeau07d20c32019-10-16 13:45:56 -0400250 </LinearLayout>
Beth Thibodeau07d20c32019-10-16 13:45:56 -0400251</LinearLayout>