1<?xml version="1.0" encoding="utf-8"?>
2<!--
3     Copyright (C) 2023 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<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
18    xmlns:app="http://schemas.android.com/apk/res-auto"
19    xmlns:tools="http://schemas.android.com/tools"
20    android:id="@+id/tile"
21    android:layout_width="wrap_content"
22    android:layout_height="wrap_content"
23    android:orientation="vertical">
24
25    <androidx.cardview.widget.CardView
26        android:id="@+id/wallpaper_container"
27        android:layout_width="match_parent"
28        android:layout_height="match_parent"
29        android:contentDescription="@string/wallpaper_thumbnail"
30        android:foreground="?attr/selectableItemBackground"
31        app:cardCornerRadius="?android:dialogCornerRadius"
32        app:cardBackgroundColor="@android:color/transparent"
33        app:cardElevation="@dimen/labeled_grid_item_image_card_elevation">
34
35        <RelativeLayout
36            android:layout_width="match_parent"
37            android:layout_height="match_parent">
38
39            <ImageView
40                android:id="@+id/thumbnail"
41                android:layout_width="match_parent"
42                android:layout_height="match_parent"
43                android:scaleType="centerCrop" />
44
45            <ImageView
46                android:id="@+id/overlay_icon"
47                android:layout_width="wrap_content"
48                android:layout_height="wrap_content"
49                android:layout_centerInParent="true" />
50
51            <ImageView
52                android:id="@+id/indicator_icon"
53                android:layout_width="wrap_content"
54                android:layout_height="wrap_content"
55                android:layout_alignParentBottom="true"
56                android:layout_alignParentEnd="true"
57                android:visibility="gone" />
58
59            <ImageView
60                android:id="@+id/scrim"
61                android:layout_width="match_parent"
62                android:layout_height="match_parent"
63                android:layout_centerInParent="true"
64                android:src="@drawable/bottom_gradient_black_scrim"/>
65
66            <TextView
67                android:id="@+id/title"
68                android:layout_width="match_parent"
69                android:layout_height="wrap_content"
70                android:layout_alignParentBottom="true"
71                android:layout_alignParentStart="true"
72                android:layout_marginBottom="@dimen/grid_item_individual_label_padding_bottom"
73                android:layout_marginHorizontal="@dimen/grid_item_individual_label_padding_horizontal"
74                android:ellipsize="end"
75                android:gravity="start|bottom"
76                android:maxLines="2"
77                android:minHeight="@dimen/grid_item_category_label_minimum_height"
78                android:textAppearance="@style/GridLabelTextAppearance"
79                android:visibility="gone"
80                tools:text="Wallpaper" />
81
82            <FrameLayout
83                android:id="@+id/loading_indicator_container"
84                android:layout_width="match_parent"
85                android:layout_height="match_parent"
86                android:visibility="gone">
87
88                <ProgressBar
89                    android:id="@+id/loading_indicator"
90                    android:layout_width="@dimen/tile_desktop_progress_bar_size"
91                    android:layout_height="@dimen/tile_desktop_progress_bar_size"
92                    android:layout_gravity="center"
93                    android:indeterminate="true"
94                    android:indeterminateTint="?android:colorAccent" />
95
96            </FrameLayout>
97        </RelativeLayout>
98
99    </androidx.cardview.widget.CardView>
100
101</LinearLayout>
102