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 confirming the addition of a piece of information to an existing contact. --> 18 19 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 20 xmlns:ex="http://schemas.android.com/apk/res/com.android.contacts" 21 android:id="@+id/root_view" 22 android:orientation="vertical" 23 android:visibility="invisible" 24 style="@style/ConfirmAddDetailViewStyle"> 25 26 <!-- 27 The header contains the contact photo, name, a link to the contact card, and 28 possibly an extra data field to disambiguate contacts with the same name. 29 --> 30 <RelativeLayout 31 style="@style/ConfirmAddDetailHeaderViewStyle"> 32 33 <ImageView 34 android:id="@+id/photo" 35 android:layout_width="match_parent" 36 android:layout_height="match_parent" 37 android:scaleType="centerCrop" 38 android:src="@drawable/ic_contact_picture_180_holo_light" /> 39 40 <View 41 android:id="@+id/photo_text_bar" 42 android:layout_width="0dip" 43 android:layout_height="42dip" 44 android:layout_alignBottom="@id/photo" 45 android:layout_alignLeft="@id/photo" 46 android:layout_alignRight="@id/photo" 47 android:background="#7F000000" /> 48 49 <ImageButton 50 android:id="@+id/open_details_button" 51 android:src="@drawable/ic_contacts_holo_dark" 52 android:background="?android:attr/selectableItemBackground" 53 android:layout_height="wrap_content" 54 android:layout_width="wrap_content" 55 android:layout_marginRight="16dip" 56 android:layout_marginBottom="5dip" 57 android:layout_alignBottom="@id/photo_text_bar" 58 android:layout_alignRight="@id/photo_text_bar" /> 59 60 <LinearLayout 61 android:layout_width="match_parent" 62 android:layout_height="42dip" 63 android:orientation="vertical" 64 android:layout_alignBottom="@id/photo" 65 android:layout_alignLeft="@id/photo" 66 android:layout_toLeftOf="@id/open_details_button" 67 android:paddingRight="8dip" 68 android:paddingLeft="8dip"> 69 70 <TextView 71 android:id="@+id/name" 72 android:layout_width="wrap_content" 73 android:layout_height="0dip" 74 android:layout_weight="1" 75 android:paddingLeft="8dip" 76 android:gravity="center_vertical" 77 android:textColor="@android:color/white" 78 android:textSize="16sp" 79 android:singleLine="true" /> 80 81 <TextView 82 android:id="@+id/extra_info" 83 android:layout_width="wrap_content" 84 android:layout_height="0dip" 85 android:layout_weight="1" 86 android:paddingLeft="8dip" 87 android:gravity="center_vertical" 88 android:textAppearance="?android:attr/textAppearanceSmall" 89 android:textColor="@android:color/white" 90 android:singleLine="true" 91 android:paddingBottom="4dip" 92 android:visibility="gone" /> 93 94 </LinearLayout> 95 96 <View 97 android:id="@+id/open_details_push_layer" 98 android:layout_width="match_parent" 99 android:layout_height="match_parent" 100 android:background="?android:attr/selectableItemBackground" /> 101 102 </RelativeLayout> 103 104 <!-- Message that gets displayed if the contact is read-only (instead of showing the editor) --> 105 <TextView android:id="@+id/read_only_warning" 106 android:layout_width="match_parent" 107 android:layout_height="wrap_content" 108 android:minHeight="60dip" 109 android:visibility="gone" 110 android:padding="15dip" 111 android:textAppearance="?android:attr/textAppearanceSmall"/> 112 113 <!-- Container for a single detail field editor when the contact is not read-only --> 114 <FrameLayout 115 android:id="@+id/editor_container" 116 android:layout_width="match_parent" 117 android:layout_height="wrap_content" 118 android:minHeight="60dip" 119 android:layout_marginTop="4dip" 120 android:layout_marginRight="15dip"/> 121 122 <View 123 android:id="@+id/divider" 124 android:layout_width="match_parent" 125 android:layout_height="1dip" 126 android:background="?android:attr/listDivider"/> 127 128 <!-- Action buttons --> 129 <LinearLayout 130 android:layout_width="match_parent" 131 android:layout_height="wrap_content" 132 android:orientation="horizontal" 133 style="?android:attr/buttonBarStyle"> 134 135 <Button 136 android:id="@+id/btn_cancel" 137 style="?android:attr/buttonBarButtonStyle" 138 android:layout_width="0dip" 139 android:layout_height="wrap_content" 140 android:layout_weight="1" 141 android:text="@android:string/cancel" /> 142 143 <Button 144 android:id="@+id/btn_done" 145 style="?android:attr/buttonBarButtonStyle" 146 android:layout_width="0dip" 147 android:layout_height="wrap_content" 148 android:layout_weight="1" 149 android:text="@android:string/ok" /> 150 151 </LinearLayout> 152 153 </LinearLayout>