1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 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
18
19<com.android.tv.settings.suggestions.SuggestionItemView
20    xmlns:android="http://schemas.android.com/apk/res/android"
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:descendantFocusability="afterDescendants"
24    android:importantForAccessibility="no">
25    <LinearLayout
26        android:id="@+id/main_container"
27        android:layout_width="match_parent"
28        android:layout_height="wrap_content"
29        android:addStatesFromChildren="true"
30        android:background="?android:attr/selectableItemBackground"
31        android:clickable="true"
32        android:focusable="false"
33        android:importantForAccessibility="no"
34        android:orientation="horizontal"
35        android:paddingEnd="@dimen/lb_preference_item_padding_end"
36        android:paddingStart="@dimen/lb_preference_item_padding_start">
37        <FrameLayout
38            android:id="@+id/icon_frame"
39            android:layout_width="wrap_content"
40            android:layout_height="wrap_content"
41            android:layout_gravity="center_vertical">
42            <ImageView
43                android:id="@android:id/icon"
44                android:layout_width="@dimen/lb_preference_item_icon_size"
45                android:layout_height="@dimen/lb_preference_item_icon_size"
46                android:layout_marginEnd="@dimen/lb_preference_item_icon_margin_end"
47            />
48        </FrameLayout>
49        <LinearLayout
50            android:id="@+id/item_container"
51            android:layout_width="0dp"
52            android:layout_height="wrap_content"
53            android:layout_weight="1"
54            android:focusable="true"
55            android:clickable="true"
56            android:orientation="vertical">
57            <Space android:layout_width="0dp"
58                   android:layout_height="@dimen/lb_preference_item_text_space_top"/>
59            <TextView
60                android:id="@android:id/title"
61                android:layout_width="wrap_content"
62                android:layout_height="wrap_content"
63                android:layout_marginBottom="@dimen/lb_preference_item_primary_text_margin_bottom"
64                android:fontFamily="sans-serif"
65                android:textColor="@color/lb_preference_item_primary_text_color"
66                android:textSize="@dimen/lb_preference_item_primary_text_size"/>
67            <TextView
68                android:id="@android:id/summary"
69                android:layout_width="wrap_content"
70                android:layout_height="wrap_content"
71                android:fontFamily="sans-serif-condensed"
72                android:maxLines="4"
73                android:textColor="@color/lb_preference_item_secondary_text_color"
74                android:textSize="@dimen/lb_preference_item_secondary_text_size"/>
75            <Space android:layout_width="0dp"
76                   android:layout_height="@dimen/lb_preference_item_text_space_bottom"/>
77        </LinearLayout>
78        <ImageView
79            android:id="@+id/dismiss_button"
80            android:layout_width="22dp"
81            android:layout_height="22dp"
82            android:layout_marginStart="6dp"
83            android:layout_gravity="center_vertical"
84            android:alpha="0.4"
85            android:clickable="true"
86            android:contentDescription="@string/dismiss_suggestion"
87            android:focusable="true"
88            android:src="@drawable/ic_dismiss"/>
89
90        <LinearLayout
91            android:id="@android:id/widget_frame"
92            android:layout_width="wrap_content"
93            android:layout_height="match_parent"
94            android:gravity="center_vertical"
95            android:orientation="vertical"/>
96    </LinearLayout>
97</com.android.tv.settings.suggestions.SuggestionItemView>