| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| ~ Copyright (C) 2019 The Android Open Source Project |
| ~ |
| ~ Licensed under the Apache License, Version 2.0 (the "License"); |
| ~ you may not use this file except in compliance with the License. |
| ~ You may obtain a copy of the License at |
| ~ |
| ~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~ |
| ~ Unless required by applicable law or agreed to in writing, software |
| ~ distributed under the License is distributed on an "AS IS" BASIS, |
| ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| ~ See the License for the specific language governing permissions and |
| ~ limitations under the License |
| --> |
| |
| <!-- Layout for media controls inside QSPanel carousel --> |
| <androidx.constraintlayout.motion.widget.MotionLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| xmlns:app="http://schemas.android.com/apk/res-auto" |
| android:id="@+id/qs_media_controls" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:background="@drawable/qs_media_background" |
| android:gravity="center_horizontal|fill_vertical" |
| android:paddingBottom="@dimen/qs_media_panel_outer_padding" |
| app:layoutDescription="@xml/media_scene"> |
| |
| <FrameLayout |
| android:id="@+id/notification_media_progress_time" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:forceHasOverlappingRendering="false"> |
| <!-- width is set to "match_parent" to avoid extra layout calls --> |
| <TextView |
| android:id="@+id/media_elapsed_time" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_alignParentLeft="true" |
| android:fontFamily="@*android:string/config_bodyFontFamily" |
| android:gravity="left" |
| android:textSize="14sp" /> |
| |
| <TextView |
| android:id="@+id/media_total_time" |
| android:layout_width="match_parent" |
| android:layout_height="wrap_content" |
| android:layout_alignParentRight="true" |
| android:fontFamily="@*android:string/config_bodyFontFamily" |
| android:gravity="right" |
| android:textSize="14sp" /> |
| </FrameLayout> |
| |
| <ImageButton |
| android:id="@+id/action0" |
| style="@style/MediaPlayer.Button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" /> |
| |
| <ImageButton |
| android:id="@+id/action1" |
| style="@style/MediaPlayer.Button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" /> |
| |
| <ImageButton |
| android:id="@+id/action2" |
| style="@style/MediaPlayer.Button" |
| android:layout_width="52dp" |
| android:layout_height="52dp" /> |
| |
| <ImageButton |
| android:id="@+id/action3" |
| style="@style/MediaPlayer.Button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" /> |
| |
| <ImageButton |
| android:id="@+id/action4" |
| style="@style/MediaPlayer.Button" |
| android:layout_width="48dp" |
| android:layout_height="48dp" /> |
| |
| <!-- Album Art --> |
| <ImageView |
| android:id="@+id/album_art" |
| android:layout_width="@dimen/qs_media_album_size" |
| android:layout_height="@dimen/qs_media_album_size" /> |
| |
| <!-- Seamless Output Switcher --> |
| <LinearLayout |
| android:id="@+id/media_seamless" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:background="@*android:drawable/media_seamless_background" |
| android:orientation="horizontal" |
| android:forceHasOverlappingRendering="false" |
| android:paddingLeft="12dp" |
| android:paddingTop="6dp" |
| android:paddingRight="12dp" |
| android:paddingBottom="6dp"> |
| |
| <ImageView |
| android:id="@+id/media_seamless_image" |
| android:layout_width="@dimen/qs_seamless_icon_size" |
| android:layout_height="@dimen/qs_seamless_icon_size" |
| android:layout_marginRight="8dp" |
| android:src="@*android:drawable/ic_media_seamless" /> |
| |
| <TextView |
| android:id="@+id/media_seamless_text" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:fontFamily="@*android:string/config_bodyFontFamily" |
| android:singleLine="true" |
| android:text="@*android:string/ext_media_seamless_action" |
| android:textSize="14sp" /> |
| </LinearLayout> |
| |
| <!-- Seek Bar --> |
| <SeekBar |
| android:id="@+id/media_progress_bar" |
| style="@android:style/Widget.ProgressBar.Horizontal" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:clickable="true" |
| android:maxHeight="3dp" |
| android:paddingTop="16dp" |
| android:paddingBottom="16dp" |
| android:splitTrack="false" /> |
| |
| <!-- App name --> |
| <TextView |
| android:id="@+id/app_name" |
| android:layout_width="0dp" |
| android:layout_height="wrap_content" |
| android:singleLine="true" |
| android:textSize="14sp" /> |
| |
| <!-- Song name --> |
| <TextView |
| android:id="@+id/header_title" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:fontFamily="@*android:string/config_headlineFontFamilyMedium" |
| android:singleLine="true" |
| android:textSize="18sp" /> |
| |
| <!-- Artist name --> |
| <TextView |
| android:id="@+id/header_artist" |
| android:layout_width="wrap_content" |
| android:layout_height="wrap_content" |
| android:fontFamily="@*android:string/config_bodyFontFamily" |
| android:singleLine="true" |
| android:textSize="14sp" /> |
| |
| <com.android.internal.widget.CachingIconView |
| android:id="@+id/icon" |
| android:layout_width="16dp" |
| android:layout_height="16dp" /> |
| |
| <!-- Buttons to remove this view when no longer needed --> |
| <include |
| layout="@layout/qs_media_panel_options" |
| android:visibility="gone" |
| app:layout_constraintEnd_toEndOf="parent" |
| app:layout_constraintStart_toStartOf="parent" |
| app:layout_constraintTop_toTopOf="parent" /> |
| </androidx.constraintlayout.motion.widget.MotionLayout> |