• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!--
2     Copyright (C) 2012 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<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
17    android:layout_width="match_parent"
18    android:layout_height="wrap_content" >
19
20    <!-- Dream selectable row (icon, caption, radio button) -->
21
22    <RelativeLayout
23        android:id="@android:id/widget_frame"
24        android:layout_width="match_parent"
25        android:layout_height="wrap_content"
26        android:layout_toStartOf="@+id/divider"
27        android:clickable="true"
28        android:focusable="true"
29        android:background="?android:attr/selectableItemBackground" >
30
31        <!-- Dream icon -->
32
33        <ImageView
34            android:id="@android:id/icon"
35            android:layout_width="@android:dimen/app_icon_size"
36            android:layout_height="@android:dimen/app_icon_size"
37            android:layout_centerVertical="true"
38            android:layout_marginBottom="10dp"
39            android:layout_marginStart="0dp"
40            android:layout_marginEnd="6dp"
41            android:layout_marginTop="10dp"
42            android:contentDescription="@null"
43            android:maxHeight="@android:dimen/app_icon_size"
44            android:maxWidth="@android:dimen/app_icon_size"
45            android:scaleType="fitCenter" />
46
47        <!-- Dream caption -->
48
49        <TextView
50            android:id="@android:id/title"
51            android:layout_width="match_parent"
52            android:layout_height="wrap_content"
53            android:layout_centerVertical="true"
54            android:layout_toStartOf="@android:id/button1"
55            android:layout_toEndOf="@android:id/icon"
56            android:ellipsize="end"
57            android:singleLine="true"
58            android:textAppearance="?android:attr/textAppearanceMedium"
59            android:textAlignment="viewStart"
60            android:labelFor="@android:id/button2" />
61
62        <!-- Dream radio button -->
63
64        <RadioButton
65            android:id="@android:id/button1"
66            android:layout_width="wrap_content"
67            android:layout_height="match_parent"
68            android:layout_alignParentEnd="true"
69            android:layout_centerVertical="true"
70            android:duplicateParentState="true"
71            android:clickable="false"
72            android:focusable="false" />
73    </RelativeLayout>
74
75    <!-- Divider -->
76
77    <ImageView
78        android:id="@id/divider"
79        android:layout_width="wrap_content"
80        android:layout_height="match_parent"
81        android:layout_centerVertical="true"
82        android:layout_toStartOf="@android:id/button2"
83        android:contentDescription="@null"
84        android:src="@drawable/nav_divider" />
85
86    <!-- Settings icon -->
87
88    <ImageView
89        android:id="@android:id/button2"
90        android:layout_width="wrap_content"
91        android:layout_height="match_parent"
92        android:layout_alignBottom="@android:id/widget_frame"
93        android:layout_alignParentEnd="true"
94        android:layout_alignTop="@android:id/widget_frame"
95        android:layout_centerVertical="true"
96        android:layout_margin="0dip"
97        android:background="?android:attr/selectableItemBackground"
98        android:contentDescription="@string/screensaver_settings_button"
99        android:padding="8dip"
100        android:clickable="true"
101        android:focusable="true"
102        android:src="@drawable/ic_bt_config" />
103
104</RelativeLayout>
105