<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<!-- placed inside act_edit as tabcontent -->
<com.android.contacts.ui.widget.ReadOnlyContactEditorView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
>

    <!-- Left side color bar -->
    <ImageView
        android:id="@+id/color_bar"
        android:layout_width="4dip"
        android:layout_height="match_parent"
        android:visibility="gone"
    />

    <!-- The content -->
    <LinearLayout
        android:layout_width="0dip"
        android:layout_height="wrap_content"
        android:layout_weight="1"
        android:orientation="vertical"
    >

        <!-- Account info header -->
        <RelativeLayout android:id="@+id/header"
            android:layout_height="64dip"
            android:layout_width="match_parent"
        >

            <ImageView android:id="@+id/header_color_bar"
                android:layout_width="match_parent"
                android:layout_height="4dip"
                android:layout_marginBottom="5dip"
                android:background="@color/edit_divider"
            />

            <ImageView android:id="@+id/header_icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginLeft="7dip"
                android:layout_marginRight="7dip"
                android:layout_centerVertical="true"
                android:layout_below="@id/header_color_bar"
            />

            <TextView android:id="@+id/header_account_type"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/header_icon"
                android:layout_alignTop="@id/header_icon"
                android:layout_marginTop="-4dip"

                android:textSize="24sp"
                android:textColor="?android:attr/textColorPrimary"
                android:singleLine="true"
            />

            <TextView android:id="@+id/header_account_name"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_toRightOf="@+id/header_icon"
                android:layout_alignBottom="@+id/header_icon"
                android:layout_marginBottom="2dip"

                android:textAppearance="?android:attr/textAppearanceSmall"
                android:textColor="?android:attr/textColorPrimary"
                android:singleLine="true"
            />

            <View
                android:layout_width="match_parent"
                android:layout_height="1px"
                android:layout_alignParentBottom="true"

                android:background="?android:attr/listDivider"
            />

        </RelativeLayout>

        <FrameLayout
            android:id="@+id/stub_photo"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingLeft="12dip"
            android:paddingTop="10dip">

            <include
                android:id="@+id/edit_photo"
                layout="@layout/item_photo_editor" />

        </FrameLayout>

        <TextView android:id="@+id/read_only_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="6dip"
            android:layout_marginBottom="6dip"
            android:layout_marginLeft="10dip"

            android:textAppearance="?android:attr/textAppearanceLarge"
        />

        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:background="?android:attr/listDivider"
        />

        <TextView
            android:id="@+id/read_only_warning"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="13dip"
            android:layout_marginBottom="13dip"
            android:layout_marginLeft="13dip"

            android:textAppearance="?android:attr/textAppearanceSmall"
            android:textColor="?android:attr/textColorPrimary"
            android:drawableLeft="@android:drawable/ic_dialog_alert"
            android:drawablePadding="10dip"
        />

        <View
            android:layout_width="match_parent"
            android:layout_height="1px"
            android:background="?android:attr/listDivider"
        />

        <LinearLayout android:id="@+id/sect_general"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
        />
    </LinearLayout>

</com.android.contacts.ui.widget.ReadOnlyContactEditorView>
