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:layout_alignStart="@id/photo" 47 android:layout_alignEnd="@id/photo" 48 android:background="#7F000000" /> 49 50 <ImageButton 51 android:id="@+id/open_details_button" 52 android:src="@drawable/ic_contacts_holo_dark" 53 android:background="?android:attr/selectableItemBackground" 54 android:layout_height="wrap_content" 55 android:layout_width="wrap_content" 56 android:layout_marginRight="16dip" 57 android:layout_marginEnd="16dip" 58 android:layout_marginBottom="5dip" 59 android:layout_alignBottom="@id/photo_text_bar" 60 android:layout_alignRight="@id/photo_text_bar" 61 android:layout_alignEnd="@id/photo_text_bar" /> 62 63 <LinearLayout 64 android:layout_width="match_parent" 65 android:layout_height="42dip" 66 android:orientation="vertical" 67 android:layout_alignBottom="@id/photo" 68 android:layout_alignLeft="@id/photo" 69 android:layout_alignStart="@id/photo" 70 android:layout_toLeftOf="@id/open_details_button" 71 android:layout_toStartOf="@id/open_details_button" 72 android:paddingLeft="8dip" 73 android:paddingRight="8dip" 74 android:paddingStart="8dip" 75 android:paddingEnd="8dip"> 76 77 <TextView 78 android:id="@+id/name" 79 android:layout_width="wrap_content" 80 android:layout_height="0dip" 81 android:layout_weight="1" 82 android:paddingLeft="8dip" 83 android:paddingStart="8dip" 84 android:gravity="center_vertical" 85 android:textColor="@android:color/white" 86 android:textSize="16sp" 87 android:singleLine="true" /> 88 89 <TextView 90 android:id="@+id/extra_info" 91 android:layout_width="wrap_content" 92 android:layout_height="0dip" 93 android:layout_weight="1" 94 android:paddingLeft="8dip" 95 android:paddingStart="8dip" 96 android:gravity="center_vertical" 97 android:textAppearance="?android:attr/textAppearanceSmall" 98 android:textColor="@android:color/white" 99 android:singleLine="true" 100 android:paddingBottom="4dip" 101 android:visibility="gone" /> 102 103 </LinearLayout> 104 105 <View 106 android:id="@+id/open_details_push_layer" 107 android:layout_width="match_parent" 108 android:layout_height="match_parent" 109 android:background="?android:attr/selectableItemBackground" /> 110 111 </RelativeLayout> 112 113 <!-- Message that gets displayed if the contact is read-only (instead of showing the editor) --> 114 <TextView android:id="@+id/read_only_warning" 115 android:layout_width="match_parent" 116 android:layout_height="wrap_content" 117 android:minHeight="60dip" 118 android:visibility="gone" 119 android:padding="15dip" 120 android:textAppearance="?android:attr/textAppearanceSmall"/> 121 122 <!-- Container for a single detail field editor when the contact is not read-only --> 123 <FrameLayout 124 android:id="@+id/editor_container" 125 android:layout_width="match_parent" 126 android:layout_height="wrap_content" 127 android:minHeight="60dip" 128 android:layout_marginTop="4dip" 129 android:layout_marginRight="15dip" 130 android:layout_marginEnd="15dip"/> 131 132 <View 133 android:id="@+id/divider" 134 android:layout_width="match_parent" 135 android:layout_height="1dip" 136 android:background="?android:attr/listDivider"/> 137 138 <!-- Action buttons --> 139 <LinearLayout 140 android:layout_width="match_parent" 141 android:layout_height="wrap_content" 142 android:orientation="horizontal" 143 style="?android:attr/buttonBarStyle"> 144 145 <Button 146 android:id="@+id/btn_cancel" 147 style="?android:attr/buttonBarButtonStyle" 148 android:layout_width="0dip" 149 android:layout_height="wrap_content" 150 android:layout_weight="1" 151 android:text="@android:string/cancel" /> 152 153 <Button 154 android:id="@+id/btn_done" 155 style="?android:attr/buttonBarButtonStyle" 156 android:layout_width="0dip" 157 android:layout_height="wrap_content" 158 android:layout_weight="1" 159 android:text="@android:string/ok" /> 160 161 </LinearLayout> 162 163 </LinearLayout>