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
17<!-- Based off packages/apps/settings/res/layout/preference_material_settings.xml
18     except that this has a thinner icon layout. -->
19<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
20              android:layout_width="match_parent"
21              android:layout_height="wrap_content"
22              android:paddingStart="?android:attr/listPreferredItemPaddingStart"
23              android:addStatesFromChildren="true"
24              android:background="?android:attr/activatedBackgroundIndicator"
25              android:gravity="center_vertical"
26              android:minHeight="?android:attr/listPreferredItemHeightSmall"
27              android:clipToPadding="false">
28
29
30    <LinearLayout
31        android:layout_width="0dp"
32        android:layout_height="wrap_content"
33        android:layout_weight="1"
34        android:minHeight="72dp"
35        android:paddingTop="16dp"
36        android:paddingBottom="16dp"
37        android:gravity="center_vertical"
38        android:orientation="horizontal">
39
40        <TextView android:id="@android:id/title"
41                  android:layout_width="wrap_content"
42                  android:layout_height="wrap_content"
43                  android:singleLine="true"
44                  android:textAppearance="?android:attr/textAppearanceListItem"
45                  android:ellipsize="marquee" />
46
47        <LinearLayout
48            android:id="@+id/icon_frame"
49            android:layout_width="wrap_content"
50            android:layout_height="wrap_content"
51            android:gravity="start|center_vertical"
52            android:orientation="horizontal"
53            android:paddingStart="24dp">
54            <com.android.internal.widget.PreferenceImageView
55                android:id="@android:id/icon"
56                android:layout_width="wrap_content"
57                android:layout_height="wrap_content"
58                android:maxWidth="24dp"
59                android:maxHeight="24dp" />
60        </LinearLayout>
61    </LinearLayout>
62
63
64    <LinearLayout
65        android:layout_width="wrap_content"
66        android:layout_height="wrap_content"
67        android:minHeight="72dp"
68        android:paddingTop="16dp"
69        android:paddingBottom="16dp"
70        android:gravity="end|center_vertical"
71        android:orientation="horizontal">
72        <TextView android:id="@android:id/summary"
73            android:layout_width="wrap_content"
74            android:layout_height="wrap_content"
75            android:layout_below="@android:id/title"
76            android:layout_alignStart="@android:id/title"
77            android:paddingStart="12dp"
78            android:gravity="end"
79            android:textAppearance="?android:attr/textAppearanceListItemSecondary"
80            android:textColor="@color/text_color_state"
81            android:maxLines="10" />
82    </LinearLayout>
83
84
85    <!-- Preference should place its actual preference widget here. Show spinner when calculating size -->
86    <ProgressBar
87        android:id="@+id/progress_bar"
88        android:layout_width="32dp"
89        android:layout_height="32dp"
90        android:layout_marginEnd="?android:attr/listPreferredItemPaddingEnd"
91        android:padding="4dp"
92        android:gravity="end|center_vertical"
93        android:indeterminate="true"
94        android:visibility="gone" />
95    <LinearLayout android:id="@android:id/widget_frame"
96                  android:layout_width="wrap_content"
97                  android:layout_height="match_parent"
98                  android:gravity="end|center_vertical"
99                  android:orientation="vertical"
100                  android:paddingEnd="?android:attr/listPreferredItemPaddingEnd"
101                  android:visibility="gone"/>
102
103</LinearLayout>
104