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