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:layout_weight="1"
31        android:gravity="start|center_vertical"
32        android:paddingStart="?android:attr/listPreferredItemPaddingStart"
33        android:paddingEnd="?android:attr/listPreferredItemPaddingEnd">
34
35        <FrameLayout
36            android:id="@+id/icon_frame"
37            android:layout_width="wrap_content"
38            android:layout_height="wrap_content"
39            android:minWidth="56dp"
40            android:paddingEnd="12dp"
41            android:paddingTop="16dp"
42            android:paddingBottom="4dp">
43
44            <ImageView
45                android:id="@android:id/icon"
46                android:layout_width="wrap_content"
47                android:layout_height="wrap_content" />
48
49        </FrameLayout>
50
51        <RelativeLayout
52            android:layout_width="wrap_content"
53            android:layout_height="wrap_content"
54            android:paddingTop="16dp"
55            android:paddingBottom="16dp">
56
57            <TextView
58                android:id="@android:id/title"
59                android:layout_width="wrap_content"
60                android:layout_height="wrap_content"
61                android:singleLine="true"
62                android:textAppearance="?android:attr/textAppearanceListItem"
63                android:ellipsize="marquee" />
64
65            <TextView
66                android:id="@android:id/summary"
67                android:layout_width="wrap_content"
68                android:layout_height="wrap_content"
69                android:layout_below="@android:id/title"
70                android:layout_alignStart="@android:id/title"
71                android:textAppearance="?android:attr/textAppearanceListItemSecondary"
72                android:textColor="?android:attr/textColorSecondary"
73                android:maxLines="10" />
74
75        </RelativeLayout>
76
77    </LinearLayout>
78
79    <View
80        android:id="@+id/divider"
81        android:layout_width="1dp"
82        android:layout_height="match_parent"
83        android:layout_marginTop="16dp"
84        android:layout_marginBottom="16dp"
85        android:background="?android:attr/listDivider" />
86
87    <!-- Preference should place its actual preference widget here. -->
88    <LinearLayout
89        android:id="@android:id/widget_frame"
90        android:layout_width="wrap_content"
91        android:layout_height="match_parent"
92        android:gravity="end|center_vertical"
93        android:minWidth="58dp"
94        android:orientation="vertical" />
95
96</LinearLayout>
97