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