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