1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2011 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<!-- Layout for a Preference in a PreferenceActivity. The
18     Preference is able to place a specific widget for its particular
19     type in the "widget_frame" layout. -->
20<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
21    android:layout_width="match_parent"
22    android:layout_height="wrap_content"
23    android:minHeight="?android:attr/listPreferredItemHeight"
24    android:gravity="center_vertical"
25    android:paddingStart="@dimen/preference_item_padding_side"
26    android:paddingEnd="?android:attr/scrollbarSize"
27    android:background="?android:attr/activatedBackgroundIndicator">
28
29    <LinearLayout
30        android:layout_width="wrap_content"
31        android:layout_height="match_parent"
32        android:gravity="center"
33        android:minWidth="@dimen/preference_icon_minWidth"
34        android:orientation="horizontal">
35        <ImageView
36            android:id="@+android:id/icon"
37            android:layout_width="48dp"
38            android:layout_height="48dp"
39            android:layout_gravity="center"
40            android:minWidth="48dp"
41            android:scaleType="centerInside"
42            android:layout_marginEnd="@dimen/preference_item_padding_inner"
43             />
44    </LinearLayout>
45
46    <RelativeLayout
47        android:layout_width="wrap_content"
48        android:layout_height="wrap_content"
49        android:layout_weight="1"
50        android:paddingEnd="@dimen/preference_item_padding_inner"
51        android:paddingTop="6dip"
52        android:paddingBottom="6dip">
53
54        <TextView android:id="@+android:id/title"
55            android:layout_width="wrap_content"
56            android:layout_height="wrap_content"
57            android:singleLine="true"
58            android:textAppearance="?android:attr/textAppearanceMedium"
59            android:ellipsize="marquee"
60            android:fadingEdge="horizontal" />
61
62        <TextView android:id="@+android:id/summary"
63            android:layout_width="wrap_content"
64            android:layout_height="wrap_content"
65            android:layout_below="@android:id/title"
66            android:layout_alignStart="@android:id/title"
67            android:textAppearance="?android:attr/textAppearanceSmall"
68            android:textColor="?android:attr/textColorSecondary"
69            android:maxLines="10" />
70
71    </RelativeLayout>
72
73    <!-- Preference should place its actual preference widget here. -->
74    <LinearLayout android:id="@+android:id/widget_frame"
75        android:layout_width="wrap_content"
76        android:layout_height="match_parent"
77        android:minWidth="@dimen/preference_widget_width"
78        android:gravity="center"
79        android:orientation="vertical" />
80
81</LinearLayout>
82