1 <!-- 2 Copyright (C) 2013 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="@+id/pkgicon" 33 android:layout_width="@*android:dimen/status_bar_icon_size" 34 android:layout_height="@*android:dimen/status_bar_icon_size" 35 android:layout_centerVertical="true" 36 android:layout_marginBottom="6dp" 37 android:layout_marginStart="0dp" 38 android:layout_marginEnd="6dp" 39 android:layout_marginTop="6dp" 40 android:contentDescription="@null" 41 android:maxHeight="@*android:dimen/status_bar_icon_size" 42 android:maxWidth="@*android:dimen/status_bar_icon_size" 43 android:scaleType="fitCenter" /> 44 45 <ImageView 46 android:id="@android:id/icon" 47 android:layout_width="@*android:dimen/status_bar_icon_size" 48 android:layout_height="@*android:dimen/status_bar_icon_size" 49 android:layout_centerVertical="true" 50 android:layout_toEndOf="@id/pkgicon" 51 android:layout_marginBottom="6dp" 52 android:layout_marginStart="0dp" 53 android:layout_marginEnd="8dp" 54 android:layout_marginTop="6dp" 55 android:contentDescription="@null" 56 android:maxHeight="@*android:dimen/status_bar_icon_size" 57 android:maxWidth="@*android:dimen/status_bar_icon_size" 58 android:scaleType="fitCenter" /> 59 60 <!-- Dream caption --> 61 62 <TextView 63 android:id="@android:id/title" 64 android:layout_width="match_parent" 65 android:layout_height="wrap_content" 66 android:layout_centerVertical="true" 67 android:layout_toStartOf="@android:id/button1" 68 android:layout_toEndOf="@android:id/icon" 69 android:ellipsize="end" 70 android:singleLine="true" 71 android:textAppearance="?android:attr/textAppearanceSmall" 72 android:textAlignment="viewStart" 73 android:labelFor="@android:id/button2" /> 74 75 <!-- Dream radio button --> 76 77 <!--<RadioButton 78 android:id="@android:id/button1" 79 android:layout_width="wrap_content" 80 android:layout_height="match_parent" 81 android:layout_alignParentEnd="true" 82 android:layout_centerVertical="true" 83 android:duplicateParentState="true" 84 android:clickable="false" 85 android:focusable="false" />--> 86 </RelativeLayout> 87 88 <!-- Divider --> 89 90 <ImageView 91 android:id="@id/divider" 92 android:layout_width="wrap_content" 93 android:layout_height="match_parent" 94 android:layout_centerVertical="true" 95 android:layout_toStartOf="@android:id/button2" 96 android:contentDescription="@null" 97 android:src="@drawable/nav_divider" /> 98 99 <!-- Settings icon --> 100 101 <ImageView 102 android:id="@android:id/button2" 103 android:layout_width="wrap_content" 104 android:layout_height="match_parent" 105 android:layout_alignBottom="@android:id/widget_frame" 106 android:layout_alignParentEnd="true" 107 android:layout_alignTop="@android:id/widget_frame" 108 android:layout_centerVertical="true" 109 android:layout_margin="0dip" 110 android:background="?android:attr/selectableItemBackground" 111 android:contentDescription="@string/screensaver_settings_button" 112 android:padding="8dip" 113 android:src="@drawable/ic_bt_config" /> 114 115 </RelativeLayout>