preference_child.xml revision d24b8183b93e781080b2c16c487e60d51c12da31
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2006 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 visually child-like Preference in a PreferenceActivity. -->
18<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
19    android:layout_width="fill_parent"
20    android:layout_height="wrap_content"
21    android:minHeight="?android:attr/listPreferredItemHeight"
22    android:gravity="center_vertical"
23    android:paddingRight="?android:attr/scrollbarSize">
24    
25    <RelativeLayout
26        android:layout_width="wrap_content"
27        android:layout_height="wrap_content"
28        android:layout_marginLeft="20dip"
29        android:layout_marginRight="6dip"
30        android:layout_marginTop="6dip"
31        android:layout_marginBottom="6dip"
32        android:layout_weight="1">
33    
34        <TextView android:id="@+android:id/title"
35            android:layout_width="wrap_content"
36            android:layout_height="wrap_content"
37            android:singleLine="true"
38            android:textAppearance="?android:attr/textAppearanceLarge"
39            android:ellipsize="marquee"
40            android:fadingEdge="horizontal" />
41            
42        <TextView android:id="@+android:id/summary"
43            android:layout_width="wrap_content"
44            android:layout_height="wrap_content"
45            android:layout_below="@android:id/title"
46            android:layout_alignLeft="@android:id/title"
47            android:textAppearance="?android:attr/textAppearanceSmall"
48            android:maxLines="2"
49            android:textColor="?android:attr/textColorSecondary" />
50
51    </RelativeLayout>
52    
53    <!-- Preference should place its actual preference widget here. -->
54    <LinearLayout android:id="@+android:id/widget_frame"
55        android:layout_width="wrap_content"
56        android:layout_height="fill_parent"
57        android:gravity="center_vertical"
58        android:orientation="vertical" />
59
60</LinearLayout>
61