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.constraintlayout.widget.ConstraintLayout 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="wrap_content" 22 android:padding="@dimen/media_browse_grid_item_padding" 23 android:layout_marginBottom="@dimen/media_browse_grid_item_margin_bottom"> 24 25 <FrameLayout 26 android:id="@+id/item_container" 27 android:layout_width="match_parent" 28 android:layout_height="wrap_content" 29 android:clickable="true" 30 android:focusable="true" 31 android:foreground="?android:attr/selectableItemBackground" 32 app:layout_constraintEnd_toEndOf="parent" 33 app:layout_constraintStart_toStartOf="parent" 34 app:layout_constraintTop_toTopOf="parent"> 35 36 <com.android.car.media.common.FixedRatioImageView 37 android:id="@+id/thumbnail" 38 android:layout_width="match_parent" 39 android:layout_height="0dp" 40 android:scaleType="centerCrop" 41 app:aspect_ratio="1"/> 42 43 </FrameLayout> 44 45 <ImageView 46 android:id="@+id/download_icon_with_title" 47 android:layout_width="@dimen/media_browse_indicator_size" 48 android:layout_height="@dimen/media_browse_indicator_size" 49 android:src="@drawable/ic_file_download_done_black" 50 android:tint="@color/icon_tint" 51 app:layout_constraintStart_toStartOf="parent" 52 app:layout_constraintEnd_toStartOf="@+id/explicit_icon_with_title" 53 app:layout_constraintBottom_toBottomOf="@+id/title" 54 app:layout_constraintTop_toTopOf="@+id/title"/> 55 56 <ImageView 57 android:id="@+id/explicit_icon_with_title" 58 android:layout_width="@dimen/media_browse_indicator_size" 59 android:layout_height="@dimen/media_browse_indicator_size" 60 android:src="@drawable/ic_explicit_black" 61 android:tint="@color/icon_tint" 62 app:layout_constraintBottom_toBottomOf="@+id/title" 63 app:layout_constraintTop_toTopOf="@+id/title" 64 app:layout_constraintStart_toEndOf="@+id/download_icon_with_title" 65 app:layout_constraintEnd_toStartOf="@+id/title"/> 66 67 <TextView 68 android:id="@+id/title" 69 style="@style/BrowseGridTitleStyle" 70 android:layout_width="0dp" 71 android:layout_height="wrap_content" 72 android:layout_marginTop="@dimen/media_browse_grid_item_text_margin_top" 73 android:singleLine="true" 74 android:includeFontPadding="false" 75 android:duplicateParentState="true" 76 app:layout_constraintStart_toEndOf="@+id/explicit_icon_with_title" 77 app:layout_constraintTop_toBottomOf="@+id/item_container" 78 app:layout_constraintEnd_toEndOf="parent"/> 79 80 <ImageView 81 android:id="@+id/download_icon_with_subtitle" 82 android:layout_width="@dimen/media_browse_indicator_size" 83 android:layout_height="@dimen/media_browse_indicator_size" 84 android:src="@drawable/ic_file_download_done_black" 85 android:tint="@color/icon_tint" 86 app:layout_constraintBottom_toBottomOf="@+id/subtitle" 87 app:layout_constraintTop_toTopOf="@+id/subtitle" 88 app:layout_constraintStart_toStartOf="parent" 89 app:layout_constraintEnd_toStartOf="@+id/explicit_icon_with_subtitle"/> 90 91 <ImageView 92 android:id="@+id/explicit_icon_with_subtitle" 93 android:layout_width="@dimen/media_browse_indicator_size" 94 android:layout_height="@dimen/media_browse_indicator_size" 95 android:src="@drawable/ic_explicit_black" 96 android:tint="@color/icon_tint" 97 app:layout_constraintBottom_toBottomOf="@+id/subtitle" 98 app:layout_constraintTop_toTopOf="@+id/subtitle" 99 app:layout_constraintStart_toEndOf="@+id/download_icon_with_subtitle"/> 100 101 <TextView 102 android:id="@+id/subtitle" 103 style="@style/BrowseGridSubtitleStyle" 104 android:layout_width="0dp" 105 android:layout_height="wrap_content" 106 android:singleLine="true" 107 android:includeFontPadding="false" 108 android:duplicateParentState="true" 109 android:layout_marginTop="@dimen/media_browse_subtitle_margin_top" 110 app:layout_constraintTop_toBottomOf="@+id/title" 111 app:layout_constraintStart_toEndOf="@+id/explicit_icon_with_subtitle" 112 app:layout_constraintEnd_toEndOf="parent"/> 113 114</androidx.constraintlayout.widget.ConstraintLayout>