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