• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3  ~ Copyright (C) 2016 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 xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:app="http://schemas.android.com/apk/res-auto"
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:paddingLeft="?android:attr/listPreferredItemPaddingLeft"
25    android:paddingRight="?android:attr/listPreferredItemPaddingRight"
26    android:background="?android:attr/selectableItemBackground"
27    android:clipToPadding="false"
28    android:focusable="true" >
29
30    <Spinner
31        android:id="@+id/spinner"
32        android:layout_width="0dp"
33        android:layout_height="wrap_content"
34        android:visibility="invisible" />
35
36    <LinearLayout
37        android:id="@+id/icon_frame"
38        android:layout_width="wrap_content"
39        android:layout_height="wrap_content"
40        android:layout_marginLeft="-4dp"
41        android:minWidth="60dp"
42        android:gravity="start|center_vertical"
43        android:orientation="horizontal"
44        android:paddingRight="12dp"
45        android:paddingTop="4dp"
46        android:paddingBottom="4dp">
47        <android.support.v7.internal.widget.PreferenceImageView
48            android:id="@android:id/icon"
49            android:layout_width="wrap_content"
50            android:layout_height="wrap_content"
51            app:maxWidth="48dp"
52            app:maxHeight="48dp" />
53    </LinearLayout>
54
55    <RelativeLayout
56        android:layout_width="wrap_content"
57        android:layout_height="wrap_content"
58        android:layout_weight="1"
59        android:paddingTop="16dp"
60        android:paddingBottom="16dp">
61
62        <TextView android:id="@android:id/title"
63            android:layout_width="wrap_content"
64            android:layout_height="wrap_content"
65            android:singleLine="true"
66            android:textAppearance="@style/Preference_TextAppearanceMaterialSubhead"
67            android:ellipsize="marquee" />
68
69        <TextView android:id="@android:id/summary"
70            android:layout_width="wrap_content"
71            android:layout_height="wrap_content"
72            android:layout_below="@android:id/title"
73            android:layout_alignLeft="@android:id/title"
74            android:textAppearance="?android:attr/textAppearanceSmall"
75            android:textColor="?android:attr/textColorSecondary"
76            android:maxLines="10" />
77
78    </RelativeLayout>
79
80    <!-- Preference should place its actual preference widget here. -->
81    <LinearLayout android:id="@android:id/widget_frame"
82        android:layout_width="wrap_content"
83        android:layout_height="match_parent"
84        android:gravity="end|center_vertical"
85        android:paddingLeft="16dp"
86        android:orientation="vertical" />
87
88</LinearLayout>
89