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