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