1<?xml version="1.0" encoding="utf-8"?> 2<!-- 3 Copyright (C) 2019 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<LinearLayout 19 xmlns:android="http://schemas.android.com/apk/res/android" 20 android:layout_width="match_parent" 21 android:layout_height="wrap_content" 22 android:minHeight="?android:attr/listPreferredItemHeightSmall" 23 android:gravity="center_vertical" 24 android:clipToPadding="false"> 25 26 <LinearLayout 27 android:id="@+id/main_frame" 28 android:layout_width="0dp" 29 android:layout_height="wrap_content" 30 android:paddingStart="?android:attr/listPreferredItemPaddingStart" 31 android:layout_weight="1" 32 android:gravity="start|center_vertical"> 33 34 <FrameLayout 35 android:id="@+id/icon_frame" 36 android:layout_width="wrap_content" 37 android:layout_height="wrap_content" 38 android:minWidth="56dp" 39 android:paddingEnd="12dp" 40 android:paddingTop="16dp" 41 android:paddingBottom="4dp"> 42 43 <ImageView 44 android:id="@android:id/icon" 45 android:layout_width="wrap_content" 46 android:layout_height="wrap_content" /> 47 48 </FrameLayout> 49 50 <RelativeLayout 51 android:layout_width="wrap_content" 52 android:layout_height="wrap_content" 53 android:paddingTop="16dp" 54 android:paddingBottom="16dp"> 55 56 <TextView 57 android:id="@android:id/title" 58 android:layout_width="wrap_content" 59 android:layout_height="wrap_content" 60 android:singleLine="true" 61 android:textAppearance="?android:attr/textAppearanceListItem" 62 android:hyphenationFrequency="normalFast" 63 android:lineBreakWordStyle="phrase" 64 android:ellipsize="marquee" /> 65 66 <TextView 67 android:id="@android:id/summary" 68 android:layout_width="wrap_content" 69 android:layout_height="wrap_content" 70 android:layout_below="@android:id/title" 71 android:layout_alignStart="@android:id/title" 72 android:textAppearance="?android:attr/textAppearanceListItemSecondary" 73 android:textColor="?android:attr/textColorSecondary" 74 android:hyphenationFrequency="normalFast" 75 android:lineBreakWordStyle="phrase" 76 android:maxLines="10" /> 77 78 </RelativeLayout> 79 80 </LinearLayout> 81 82 <View 83 android:id="@+id/divider" 84 android:layout_width="1dp" 85 android:layout_height="match_parent" 86 android:layout_marginTop="16dp" 87 android:layout_marginBottom="16dp" 88 android:background="?android:attr/listDivider" /> 89 90 <!-- Preference should place its actual preference widget here. --> 91 <LinearLayout 92 android:id="@android:id/widget_frame" 93 android:layout_width="wrap_content" 94 android:layout_height="match_parent" 95 android:gravity="end|center_vertical" 96 android:paddingEnd="?android:attr/listPreferredItemPaddingEnd" 97 android:minWidth="58dp" 98 android:orientation="vertical" /> 99 100</LinearLayout> 101