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<com.android.car.ui.FocusArea 18 xmlns:android="http://schemas.android.com/apk/res/android" 19 xmlns:app="http://schemas.android.com/apk/res-auto" 20 android:layout_width="match_parent" 21 android:layout_height="match_parent"> 22 23 <androidx.cardview.widget.CardView 24 android:layout_height="match_parent" 25 android:layout_width="match_parent" 26 app:cardElevation="0dp" 27 app:cardCornerRadius="6dp"> 28 29 <com.android.car.apps.common.CrossfadeImageView 30 android:id="@+id/album_background" 31 android:foreground="?android:attr/selectableItemBackground" 32 android:layout_width="match_parent" 33 android:layout_height="match_parent" 34 android:focusable="false" 35 android:scaleType="fitStart"/> 36 37 <View 38 android:id="@+id/playback_scrim" 39 android:layout_width="match_parent" 40 android:layout_height="match_parent" 41 android:background="@color/album_art_scrim" 42 android:focusable="true" 43 android:alpha="@dimen/album_art_scrim_alpha"/> 44 45 <androidx.constraintlayout.widget.ConstraintLayout 46 android:id="@+id/playback_container" 47 android:layout_width="match_parent" 48 android:layout_height="match_parent"> 49 50 <ImageView 51 android:id="@+id/app_icon" 52 android:layout_width="@dimen/app_selector_icon_size" 53 android:layout_height="@dimen/app_selector_icon_size" 54 android:layout_gravity="center" 55 android:layout_marginStart="@dimen/playback_fragment_text_margin_x" 56 android:background="?android:attr/selectableItemBackground" 57 android:src="@drawable/ic_app_switch" 58 app:layout_constraintTop_toTopOf="@+id/app_name" 59 app:layout_constraintBottom_toBottomOf="@+id/app_name" 60 app:layout_constraintStart_toStartOf="parent"/> 61 62 <TextView 63 android:id="@+id/app_name" 64 android:layout_width="0dp" 65 android:layout_height="wrap_content" 66 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 67 android:layout_marginStart="@dimen/playback_fragment_text_margin_x" 68 android:layout_marginEnd="@dimen/playback_fragment_text_margin_x" 69 android:textAppearance="?android:attr/textAppearanceMedium" 70 android:singleLine="true" 71 android:includeFontPadding="false" 72 app:layout_constraintStart_toEndOf="@+id/app_icon" 73 app:layout_constraintEnd_toStartOf="@+id/app_selector_container" 74 app:layout_constraintTop_toTopOf="parent"/> 75 76 <TextView 77 android:id="@+id/title" 78 style="@style/PlaybackTitleStyle" 79 android:layout_width="0dp" 80 android:layout_height="wrap_content" 81 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 82 android:layout_marginStart="@dimen/playback_fragment_text_margin_x" 83 android:layout_marginEnd="@dimen/playback_fragment_text_margin_x" 84 app:layout_constraintStart_toStartOf="parent" 85 app:layout_constraintEnd_toEndOf="parent" 86 app:layout_constraintTop_toBottomOf="@+id/app_name"/> 87 88 <TextView 89 android:id="@+id/subtitle" 90 style="@style/PlaybackSubtitleStyle" 91 android:layout_width="0dp" 92 android:layout_height="wrap_content" 93 android:layout_marginTop="@dimen/playback_fragment_text_margin_top" 94 android:layout_marginStart="@dimen/playback_fragment_text_margin_x" 95 android:layout_marginEnd="@dimen/playback_fragment_text_margin_x" 96 app:layout_constraintStart_toStartOf="parent" 97 app:layout_constraintEnd_toStartOf="@+id/app_selector_container" 98 app:layout_constraintTop_toBottomOf="@+id/title"/> 99 100 <com.android.car.apps.common.UxrTextView 101 android:id="@+id/error_message" 102 style="@style/FullScreenErrorMessageStyle" 103 android:layout_marginHorizontal="@dimen/playback_fragment_text_margin_x" 104 android:maxLines="@integer/widget_error_text_max_lines" 105 app:layout_constraintVertical_chainStyle="packed" 106 app:layout_constraintStart_toStartOf="parent" 107 app:layout_constraintEnd_toEndOf="parent" 108 app:layout_constraintTop_toBottomOf="@+id/app_name" 109 app:layout_constraintBottom_toTopOf="@+id/error_button" 110 /> 111 112 <com.android.car.apps.common.UxrButton 113 android:id="@+id/error_button" 114 style="@style/FullScreenErrorButtonStyle" 115 android:layout_marginTop="@dimen/playback_fragment_error_button_margin_top" 116 android:layout_marginBottom="@dimen/playback_fragment_error_button_margin_bottom" 117 app:layout_constraintStart_toStartOf="parent" 118 app:layout_constraintEnd_toEndOf="parent" 119 app:layout_constraintTop_toBottomOf="@+id/error_message" 120 app:layout_constraintBottom_toBottomOf="parent" 121 /> 122 123 <FrameLayout 124 android:id="@+id/app_selector_container" 125 xmlns:android="http://schemas.android.com/apk/res/android" 126 android:layout_width="@dimen/app_selector_icon_touch_target" 127 android:layout_height="@dimen/app_selector_icon_touch_target" 128 android:background="?android:attr/selectableItemBackground" 129 android:layout_marginEnd="@dimen/app_selector_margin_x" 130 app:layout_constraintTop_toTopOf="@+id/app_name" 131 app:layout_constraintBottom_toBottomOf="@+id/app_name" 132 app:layout_constraintEnd_toEndOf="parent"> 133 134 <ImageView 135 android:id="@+id/app_selector" 136 android:layout_width="@dimen/app_selector_icon_size" 137 android:layout_height="@dimen/app_selector_icon_size" 138 android:layout_gravity="center" 139 android:src="@drawable/ic_app_switch" 140 android:tint="@color/icon_tint"/> 141 </FrameLayout> 142 143 <com.android.car.media.common.PlaybackControlsActionBar 144 android:id="@+id/playback_controls" 145 android:layout_width="0dp" 146 android:layout_height="wrap_content" 147 android:layout_marginBottom="@dimen/playback_fragment_controls_margin_bottom" 148 app:columns="3" 149 app:enableOverflow="false" 150 app:layout_constraintBottom_toBottomOf="parent" 151 app:layout_constraintStart_toStartOf="parent" 152 app:layout_constraintEnd_toEndOf="parent"/> 153 154 </androidx.constraintlayout.widget.ConstraintLayout> 155 156 </androidx.cardview.widget.CardView> 157 158</com.android.car.ui.FocusArea> 159