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:background="?android:attr/selectableItemBackground" > 28 29 <!-- Dream icon --> 30 31 <ImageView 32 android:id="@android:id/icon" 33 android:layout_width="@android:dimen/app_icon_size" 34 android:layout_height="@android:dimen/app_icon_size" 35 android:layout_centerVertical="true" 36 android:layout_marginBottom="10dp" 37 android:layout_marginStart="0dp" 38 android:layout_marginEnd="6dp" 39 android:layout_marginTop="10dp" 40 android:contentDescription="@null" 41 android:maxHeight="@android:dimen/app_icon_size" 42 android:maxWidth="@android:dimen/app_icon_size" 43 android:scaleType="fitCenter" /> 44 45 <!-- Dream caption --> 46 47 <TextView 48 android:id="@android:id/title" 49 android:layout_width="match_parent" 50 android:layout_height="wrap_content" 51 android:layout_centerVertical="true" 52 android:layout_toStartOf="@android:id/button1" 53 android:layout_toEndOf="@android:id/icon" 54 android:ellipsize="end" 55 android:singleLine="true" 56 android:textAppearance="?android:attr/textAppearanceMedium" 57 android:textDirection="locale" 58 android:labelFor="@android:id/button2" /> 59 60 <!-- Dream radio button --> 61 62 <RadioButton 63 android:id="@android:id/button1" 64 android:layout_width="wrap_content" 65 android:layout_height="match_parent" 66 android:layout_alignParentEnd="true" 67 android:layout_centerVertical="true" 68 android:duplicateParentState="true" 69 android:clickable="false" 70 android:focusable="false" /> 71 </RelativeLayout> 72 73 <!-- Divider --> 74 75 <ImageView 76 android:id="@id/divider" 77 android:layout_width="wrap_content" 78 android:layout_height="match_parent" 79 android:layout_centerVertical="true" 80 android:layout_toStartOf="@android:id/button2" 81 android:contentDescription="@null" 82 android:src="@drawable/nav_divider" /> 83 84 <!-- Settings icon --> 85 86 <ImageView 87 android:id="@android:id/button2" 88 android:layout_width="wrap_content" 89 android:layout_height="match_parent" 90 android:layout_alignBottom="@android:id/widget_frame" 91 android:layout_alignParentEnd="true" 92 android:layout_alignTop="@android:id/widget_frame" 93 android:layout_centerVertical="true" 94 android:layout_margin="0dip" 95 android:background="?android:attr/selectableItemBackground" 96 android:contentDescription="@string/screensaver_settings_button" 97 android:padding="8dip" 98 android:src="@drawable/ic_bt_config" /> 99 100 </RelativeLayout>