1<?xml version="1.0" encoding="utf-8"?>
2<!--
3    Copyright (C) 2024 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<com.google.android.material.card.MaterialCardView
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:tools="http://schemas.android.com/tools"
20    xmlns:apps="http://schemas.android.com/apk/res-auto"
21    android:id="@+id/suggestion_card"
22    android:layout_width="match_parent"
23    android:layout_height="wrap_content"
24    android:layout_marginBottom="16dp"
25    style="@style/SuggestionCardStyle">
26
27    <LinearLayout
28        android:id="@+id/card_container"
29        android:layout_width="match_parent"
30        android:layout_height="wrap_content"
31        android:baselineAligned="false"
32        android:minHeight="72dp"
33        android:paddingStart="16dp"
34        android:paddingEnd="16dp"
35        android:orientation="horizontal"
36        android:gravity="center_vertical"
37        android:background="?android:attr/selectableItemBackground">
38
39        <FrameLayout
40            android:id="@android:id/icon_frame"
41            android:layout_width="wrap_content"
42            android:layout_height="wrap_content"
43            tools:ignore="ContentDescription">
44
45            <ImageView
46                android:layout_width="wrap_content"
47                android:layout_height="wrap_content"
48                android:src="@drawable/suggestion_icon_background"/>
49
50            <ImageView
51                android:id="@android:id/icon"
52                android:layout_width="24dp"
53                android:layout_height="24dp"
54                android:layout_gravity="center"/>
55
56        </FrameLayout>
57
58        <LinearLayout
59            android:id="@+id/text_container"
60            android:layout_width="0dp"
61            android:layout_height="wrap_content"
62            android:layout_weight="1"
63            android:paddingStart="16dp"
64            android:paddingEnd="16dp"
65            android:paddingVertical="@dimen/suggestion_card_text_padding_vertical"
66            android:orientation="vertical">
67
68            <TextView
69                android:id="@android:id/title"
70                android:layout_width="match_parent"
71                android:layout_height="wrap_content"
72                android:textAppearance="@style/TextAppearance.SuggestionCardTitle"/>
73
74            <TextView
75                android:id="@android:id/summary"
76                android:layout_width="match_parent"
77                android:layout_height="wrap_content"
78                android:textAppearance="@style/TextAppearance.SuggestionCardSummary"/>
79
80        </LinearLayout>
81
82        <ImageView
83            android:id="@android:id/closeButton"
84            android:layout_width="48dp"
85            android:layout_height="48dp"
86            android:padding="8dp"
87            android:visibility="gone"
88            android:layout_gravity="center"
89            android:contentDescription="@string/suggestion_button_close"
90            android:src="@drawable/ic_suggestion_close_button"
91            android:tint="@color/settingslib_materialColorPrimaryContainer"
92            android:background="?android:attr/selectableItemBackground" />
93
94    </LinearLayout>
95
96</com.google.android.material.card.MaterialCardView>
97