• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    android:layout_width="match_parent"
18    android:layout_height="wrap_content"
19    android:minHeight="?android:attr/listPreferredItemHeightSmall"
20    android:gravity="center_vertical"
21    android:paddingStart="?android:attr/listPreferredItemPaddingStart"
22    android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
23    android:background="?android:attr/selectableItemBackground"
24    android:clipToPadding="false">
25
26    <LinearLayout
27        android:id="@+id/icon_frame"
28        android:layout_width="wrap_content"
29        android:layout_height="wrap_content"
30        android:minWidth="56dp"
31        android:gravity="start|center_vertical"
32        android:orientation="horizontal"
33        android:paddingEnd="12dp"
34        android:paddingTop="4dp"
35        android:paddingBottom="4dp">
36        <com.android.internal.widget.PreferenceImageView
37            android:id="@android:id/icon"
38            android:layout_width="wrap_content"
39            android:layout_height="wrap_content"
40            android:maxWidth="48dp"
41            android:maxHeight="48dp" />
42    </LinearLayout>
43
44    <RelativeLayout
45        android:layout_width="wrap_content"
46        android:layout_height="wrap_content"
47        android:layout_weight="1"
48        android:paddingTop="16dp"
49        android:paddingBottom="16dp">
50
51        <TextView android:id="@android:id/title"
52            android:layout_width="wrap_content"
53            android:layout_height="wrap_content"
54            android:maxLines="2"
55            android:textAppearance="?android:attr/textAppearanceListItem"
56            android:ellipsize="marquee" />
57
58        <TextView android:id="@android:id/summary"
59            android:layout_width="wrap_content"
60            android:layout_height="wrap_content"
61            android:layout_below="@android:id/title"
62            android:layout_alignStart="@android:id/title"
63            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
64            android:textColor="?android:attr/textColorSecondary"
65            android:maxLines="10" />
66
67        <TextView android:id="@+id/additional_summary"
68            android:layout_width="wrap_content"
69            android:layout_height="wrap_content"
70            android:layout_below="@android:id/summary"
71            android:layout_alignStart="@android:id/summary"
72            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
73            android:textColor="?android:attr/textColorSecondary"
74            android:maxLines="10"
75            android:visibility="gone" />
76    </RelativeLayout>
77
78    <!-- Preference should place its actual preference widget here. -->
79    <LinearLayout android:id="@android:id/widget_frame"
80        android:layout_width="wrap_content"
81        android:layout_height="match_parent"
82        android:gravity="end|center_vertical"
83        android:paddingStart="16dp"
84        android:orientation="vertical" />
85
86</LinearLayout>
87