1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2021 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<!-- Originally copied from leanback_preference.xml in TwoPanelSettingsOverlay--> 19<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 20 android:id="@+id/container" 21 android:layout_width="match_parent" 22 android:layout_height="wrap_content" 23 android:minHeight="@dimen/tp_preference_min_height" 24 android:background="?android:attr/selectableItemBackground" 25 android:clickable="true" 26 android:focusable="true" 27 android:descendantFocusability="blocksDescendants" 28 android:orientation="horizontal" 29 android:layout_marginBottom="@dimen/tp_preference_item_margin_bottom" 30 android:paddingTop="@dimen/lb_preference_item_text_space_top" 31 android:paddingBottom="@dimen/lb_preference_item_text_space_bottom" 32 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 33 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" > 34 35 <LinearLayout android:layout_width="0dp" 36 android:layout_height="wrap_content" 37 android:layout_weight="1" 38 android:duplicateParentState="true" 39 android:layout_gravity="center_vertical" 40 android:orientation="vertical"> 41 <TextView 42 android:id="@android:id/title" 43 android:layout_width="wrap_content" 44 android:layout_height="wrap_content" 45 android:minHeight="@dimen/tp_preference_title_min_height" 46 android:includeFontPadding="false" 47 android:duplicateParentState="true" 48 android:textAppearance="?android:attr/textAppearanceListItem"/> 49 <TextView 50 android:id="@android:id/summary" 51 android:layout_width="wrap_content" 52 android:layout_height="wrap_content" 53 android:layout_marginTop="@dimen/lb_preference_item_primary_text_margin_bottom" 54 android:minHeight="@dimen/tp_preference_summary_min_height" 55 android:includeFontPadding="false" 56 android:duplicateParentState="true" 57 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 58 android:singleLine="false" 59 android:maxLines="4" /> 60 </LinearLayout> 61 62 <LinearLayout 63 android:id="@+id/icon_frame" 64 android:layout_width="wrap_content" 65 android:layout_height="match_parent" 66 android:duplicateParentState="true" 67 android:gravity="center_vertical" 68 android:orientation="vertical" > 69 <ImageView 70 android:id="@android:id/icon" 71 android:layout_width="wrap_content" 72 android:layout_height="wrap_content" 73 android:clickable="false" 74 android:focusable="false" /> 75 </LinearLayout> 76 77</LinearLayout> 78