1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 ~ Copyright (C) 2023 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<!-- Layout for media recommendation item inside QSPanel carousel --> 18<merge xmlns:android="http://schemas.android.com/apk/res/android"> 19 <!-- Album cover --> 20 <ImageView 21 android:id="@+id/media_cover" 22 android:layout_width="match_parent" 23 android:layout_height="match_parent" 24 android:translationZ="0dp" 25 android:scaleType="matrix" 26 android:adjustViewBounds="true" 27 android:clipToOutline="true" 28 android:layerType="hardware" 29 android:background="@drawable/bg_smartspace_media_item"/> 30 31 <!-- App icon --> 32 <com.android.internal.widget.CachingIconView 33 android:id="@+id/media_rec_app_icon" 34 android:layout_width="@dimen/qs_media_rec_album_icon_size" 35 android:layout_height="@dimen/qs_media_rec_album_icon_size" 36 android:minWidth="@dimen/qs_media_rec_album_icon_size" 37 android:minHeight="@dimen/qs_media_rec_album_icon_size" 38 android:layout_marginStart="@dimen/qs_media_info_spacing" 39 android:layout_marginTop="@dimen/qs_media_info_spacing"/> 40 41 <!-- Artist name --> 42 <TextView 43 android:id="@+id/media_title" 44 android:layout_width="match_parent" 45 android:layout_height="wrap_content" 46 android:layout_marginStart="@dimen/qs_media_info_spacing" 47 android:layout_marginEnd="@dimen/qs_media_info_spacing" 48 android:layout_marginBottom="@dimen/qs_media_rec_album_title_bottom_margin" 49 android:fontFamily="@*android:string/config_headlineFontFamilyMedium" 50 android:singleLine="true" 51 android:textSize="12sp" 52 android:gravity="top" 53 android:layout_gravity="bottom" 54 android:importantForAccessibility="no"/> 55 56 <!-- Album name --> 57 <TextView 58 android:id="@+id/media_subtitle" 59 android:layout_width="match_parent" 60 android:layout_height="@dimen/qs_media_rec_album_subtitle_height" 61 android:layout_marginEnd="@dimen/qs_media_info_spacing" 62 android:layout_marginStart="@dimen/qs_media_info_spacing" 63 android:layout_marginBottom="@dimen/qs_media_info_spacing" 64 android:fontFamily="@*android:string/config_headlineFontFamily" 65 android:singleLine="true" 66 android:textSize="11sp" 67 android:gravity="center_vertical" 68 android:layout_gravity="bottom" 69 android:importantForAccessibility="no"/> 70 71 <!-- Seek Bar --> 72 <SeekBar 73 android:id="@+id/media_progress_bar" 74 android:layout_width="match_parent" 75 android:layout_height="12dp" 76 android:layout_gravity="bottom" 77 android:maxHeight="@dimen/qs_media_enabled_seekbar_height" 78 android:thumb="@android:color/transparent" 79 android:splitTrack="false" 80 android:clickable="false" 81 android:progressTint="?android:attr/textColorPrimary" 82 android:progressBackgroundTint="?android:attr/textColorTertiary" 83 android:paddingTop="5dp" 84 android:paddingBottom="5dp" 85 android:paddingStart="0dp" 86 android:paddingEnd="0dp" 87 android:layout_marginEnd="@dimen/qs_media_info_spacing" 88 android:layout_marginStart="@dimen/qs_media_info_spacing" 89 android:layout_marginBottom="@dimen/qs_media_info_spacing"/> 90</merge>