1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright 2018, 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<androidx.cardview.widget.CardView 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_height="match_parent" 21 android:layout_width="match_parent" 22 app:cardElevation="0dp" 23 app:cardCornerRadius="6dp"> 24 25 <com.android.car.apps.common.CrossfadeImageView 26 android:id="@+id/album_background" 27 android:foreground="?android:attr/selectableItemBackground" 28 android:layout_width="match_parent" 29 android:layout_height="match_parent" 30 android:scaleType="fitStart" /> 31 32 <View 33 android:id="@+id/playback_scrim" 34 android:layout_width="match_parent" 35 android:layout_height="match_parent" 36 android:background="@color/album_art_scrim" 37 android:alpha="@dimen/album_art_scrim_alpha"/> 38 39 <androidx.constraintlayout.widget.ConstraintLayout 40 android:id="@+id/playback_container" 41 android:layout_width="match_parent" 42 android:layout_height="match_parent"> 43 44 <ImageView 45 android:id="@+id/app_icon" 46 android:layout_width="@dimen/app_selector_icon_size" 47 android:layout_height="@dimen/app_selector_icon_size" 48 android:layout_gravity="center" 49 android:layout_marginLeft="@dimen/playback_fragment_text_margin_x" 50 android:background="?android:attr/selectableItemBackground" 51 android:src="@drawable/ic_app_switch" 52 app:layout_constraintTop_toTopOf="@+id/app_name" 53 app:layout_constraintBottom_toBottomOf="@+id/app_name" 54 app:layout_constraintLeft_toLeftOf="parent"/> 55 56 <TextView 57 android:id="@+id/app_name" 58 android:layout_width="0dp" 59 android:layout_height="wrap_content" 60 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 61 android:layout_marginLeft="@dimen/playback_fragment_text_margin_x" 62 android:layout_marginRight="@dimen/playback_fragment_text_margin_x" 63 android:textAppearance="?android:attr/textAppearanceMedium" 64 android:singleLine="true" 65 android:includeFontPadding="false" 66 app:layout_constraintLeft_toRightOf="@+id/app_icon" 67 app:layout_constraintRight_toLeftOf="@+id/app_selector_container" 68 app:layout_constraintTop_toTopOf="parent"/> 69 70 <TextView 71 android:id="@+id/title" 72 style="@style/PlaybackTitleStyle" 73 android:layout_width="0dp" 74 android:layout_height="wrap_content" 75 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 76 android:layout_marginLeft="@dimen/playback_fragment_text_margin_x" 77 android:layout_marginRight="@dimen/playback_fragment_text_margin_x" 78 app:layout_constraintLeft_toLeftOf="parent" 79 app:layout_constraintRight_toRightOf="parent" 80 app:layout_constraintTop_toBottomOf="@+id/app_name"/> 81 82 <TextView 83 android:id="@+id/subtitle" 84 style="@style/PlaybackSubtitleStyle" 85 android:layout_width="0dp" 86 android:layout_height="wrap_content" 87 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 88 android:layout_marginLeft="@dimen/playback_fragment_text_margin_x" 89 android:layout_marginRight="@dimen/playback_fragment_text_margin_x" 90 app:layout_constraintLeft_toLeftOf="parent" 91 app:layout_constraintRight_toLeftOf="@+id/app_selector_container" 92 app:layout_constraintTop_toBottomOf="@+id/title"/> 93 94 <FrameLayout 95 android:id="@+id/app_selector_container" 96 xmlns:android="http://schemas.android.com/apk/res/android" 97 android:layout_width="@dimen/app_selector_icon_touch_target" 98 android:layout_height="@dimen/app_selector_icon_touch_target" 99 android:background="?android:attr/selectableItemBackground" 100 android:layout_marginRight="@dimen/app_selector_margin_x" 101 app:layout_constraintTop_toTopOf="@+id/app_name" 102 app:layout_constraintBottom_toBottomOf="@+id/app_name" 103 app:layout_constraintRight_toRightOf="parent"> 104 105 <ImageView 106 android:id="@+id/app_selector" 107 android:layout_width="@dimen/app_selector_icon_size" 108 android:layout_height="@dimen/app_selector_icon_size" 109 android:layout_gravity="center" 110 android:src="@drawable/ic_app_switch" 111 android:tint="@color/icon_tint" /> 112 </FrameLayout> 113 114 <com.android.car.media.common.PlaybackControlsActionBar 115 android:id="@+id/playback_controls" 116 android:layout_width="0dp" 117 android:layout_height="wrap_content" 118 android:layout_marginBottom="@dimen/playback_fragment_controls_margin_bottom" 119 app:columns="3" 120 app:enableOverflow="false" 121 app:layout_constraintBottom_toBottomOf="parent" 122 app:layout_constraintLeft_toLeftOf="parent" 123 app:layout_constraintRight_toRightOf="parent"/> 124 125 </androidx.constraintlayout.widget.ConstraintLayout> 126 127</androidx.cardview.widget.CardView> 128