Pixel perfect work for phone contact editor

- Always show account header for raw contacts
- Align text fields and titles along the left margin
- Align spinners
- Use "Add new" as the default text if there's no value
in Event or Groups field yet
- Restyle account header
- Use primary/secondary colors everywhere
- Non-editable contact fixes: remove "not editable on
this device" and replace it with a toast when the
user clicks on the header, restyle item_read_only_field

Bug: 5097095

Change-Id: I94a6c91b05344028b64c62735fb4559f9944529d
diff --git a/res/drawable-hdpi/change_photo_box_focused_holo_light.9.png b/res/drawable-hdpi/change_photo_box_focused_holo_light.9.png
deleted file mode 100644
index 5254473..0000000
--- a/res/drawable-hdpi/change_photo_box_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index f026cc8..0000000
--- a/res/drawable-hdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index a0770ea..0000000
--- a/res/drawable-hdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/change_photo_box_focused_holo_light.9.png b/res/drawable-mdpi/change_photo_box_focused_holo_light.9.png
deleted file mode 100644
index 47fb773..0000000
--- a/res/drawable-mdpi/change_photo_box_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index 591e6d5..0000000
--- a/res/drawable-mdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index 5d5eee2..0000000
--- a/res/drawable-mdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png
deleted file mode 100644
index 7dbd1e6..0000000
--- a/res/drawable-xhdpi/change_photo_box_focused_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
deleted file mode 100644
index 7e1e97f..0000000
--- a/res/drawable-xhdpi/change_photo_box_normal_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png b/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
deleted file mode 100644
index e98266f..0000000
--- a/res/drawable-xhdpi/change_photo_box_pressed_holo_light.9.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable/change_photo_box_holo_light.xml b/res/drawable/change_photo_box_holo_light.xml
deleted file mode 100644
index f08beb0..0000000
--- a/res/drawable/change_photo_box_holo_light.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2009 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.
--->
-
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:state_window_focused="false"
-        android:drawable="@drawable/change_photo_box_normal_holo_light" />
-    <item android:state_pressed="true"
-        android:drawable="@drawable/change_photo_box_pressed_holo_light" />
-    <item android:state_focused="true"
-        android:drawable="@drawable/change_photo_box_focused_holo_light" />
-    <item
-        android:drawable="@drawable/change_photo_box_normal_holo_light" />
-</selector>
diff --git a/res/layout-sw580dp/event_field_editor_view.xml b/res/layout-sw580dp/event_field_editor_view.xml
index f31b283..822de37 100644
--- a/res/layout-sw580dp/event_field_editor_view.xml
+++ b/res/layout-sw580dp/event_field_editor_view.xml
@@ -39,7 +39,6 @@
         <include
             android:id="@+id/spinner"
             layout="@layout/edit_spinner"
-            android:paddingTop="15dip"
             android:visibility="gone" />
 
         <include
diff --git a/res/layout-sw580dp/external_raw_contact_editor_view.xml b/res/layout-sw580dp/external_raw_contact_editor_view.xml
index b185c8a..fba5220 100644
--- a/res/layout-sw580dp/external_raw_contact_editor_view.xml
+++ b/res/layout-sw580dp/external_raw_contact_editor_view.xml
@@ -22,8 +22,7 @@
     android:orientation="vertical">
 
     <include
-        layout="@layout/raw_contact_editor_header"
-        android:id="@+id/header" />
+        layout="@layout/editor_account_header" />
 
     <LinearLayout
         android:id="@+id/body"
diff --git a/res/layout-sw580dp/raw_contact_editor_header.xml b/res/layout-sw580dp/raw_contact_editor_header.xml
deleted file mode 100644
index 498998d..0000000
--- a/res/layout-sw580dp/raw_contact_editor_header.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 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.
--->
-
-
-<!-- Account info header -->
-<FrameLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="64dip"
-    android:layout_width="match_parent">
-
-    <RelativeLayout
-        android:id="@+id/account"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"
-        android:background="?android:attr/selectableItemBackground">
-
-        <ImageView
-            android:id="@+id/account_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_alignParentRight="true"
-            android:layout_below="@id/header_color_bar" />
-
-        <TextView
-            android:id="@+id/account_type"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_toLeftOf="@+id/account_icon"
-            android:layout_alignTop="@id/account_icon"
-            android:layout_marginTop="-4dip"
-            android:textAppearance="?android:attr/textAppearanceMedium"
-            android:textColor="?android:attr/textColorPrimary"
-            android:singleLine="true" />
-
-        <TextView
-            android:id="@+id/account_name"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_toLeftOf="@+id/account_icon"
-            android:layout_alignBottom="@+id/account_icon"
-            android:layout_marginBottom="2dip"
-
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="?android:attr/textColorPrimary"
-            android:singleLine="true" />
-
-        <include
-              android:id="@+id/divider"
-              android:layout_alignParentBottom="true"
-              layout="@layout/edit_divider" />
-    </RelativeLayout>
-</FrameLayout>
\ No newline at end of file
diff --git a/res/layout-sw580dp/raw_contact_editor_view.xml b/res/layout-sw580dp/raw_contact_editor_view.xml
index 9c3f708..11fc161 100644
--- a/res/layout-sw580dp/raw_contact_editor_view.xml
+++ b/res/layout-sw580dp/raw_contact_editor_view.xml
@@ -21,14 +21,8 @@
     android:layout_height="wrap_content"
     android:orientation="vertical">
 
-    <FrameLayout
-        android:id="@+id/anchor_for_account_switcher"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content">
-        <include
-            layout="@layout/raw_contact_editor_header"
-            android:id="@+id/header" />
-    </FrameLayout>
+    <include
+        layout="@layout/editor_account_header" />
 
     <LinearLayout
         android:id="@+id/body"
@@ -124,8 +118,8 @@
         <com.android.contacts.widget.InterpolatingLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="10dip"
-            android:layout_marginBottom="42dip">
+            android:layout_marginTop="16dip"
+            android:layout_marginBottom="32dip">
             <Button
                 android:id="@+id/button_add_field"
                 android:text="@string/add_field"
diff --git a/res/layout/edit_add_field.xml b/res/layout/edit_add_field.xml
index 31ea05d..b17185d 100644
--- a/res/layout/edit_add_field.xml
+++ b/res/layout/edit_add_field.xml
@@ -17,7 +17,8 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingLeft="13dip"
+    android:minHeight="48dip"
+    android:paddingLeft="16dip"
     android:background="?android:attr/selectableItemBackground">
     <TextView
         android:id="@+id/add_text"
@@ -26,6 +27,6 @@
         android:layout_height="wrap_content"
         android:duplicateParentState="true"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:textColor="?android:attr/textColorTertiary"
+        android:textColor="?android:attr/textColorSecondary"
         android:text="@string/add_new_entry_for_section" />
 </FrameLayout>
\ No newline at end of file
diff --git a/res/layout/edit_date_picker.xml b/res/layout/edit_date_picker.xml
index c18d607..5122bbe 100644
--- a/res/layout/edit_date_picker.xml
+++ b/res/layout/edit_date_picker.xml
@@ -19,10 +19,11 @@
 <Button
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/date_view"
+    style="?android:attr/spinnerStyle"
     android:layout_width="0dip"
     android:layout_height="wrap_content"
     android:layout_weight="1"
     android:layout_marginLeft="@dimen/editor_field_left_padding"
     android:layout_marginRight="@dimen/editor_field_right_padding"
     android:textAppearance="?android:attr/textAppearanceMedium"
-    style="@android:style/Widget.Holo.Light.Spinner" />
\ No newline at end of file
+    android:paddingLeft="16dip" />
\ No newline at end of file
diff --git a/res/layout/edit_expansion_view.xml b/res/layout/edit_expansion_view.xml
index 96fe8de..267593d 100644
--- a/res/layout/edit_expansion_view.xml
+++ b/res/layout/edit_expansion_view.xml
@@ -19,12 +19,12 @@
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="wrap_content"
-    android:layout_height="wrap_content"
-    android:layout_gravity="top">
+    android:layout_height="match_parent">
     <ImageView
         android:id="@+id/expansion_view"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
+        android:layout_gravity="top"
         android:duplicateParentState="true"
         android:background="?android:attr/selectableItemBackground"
         android:paddingLeft="@dimen/editor_round_button_padding_left"
diff --git a/res/layout/edit_kind_title.xml b/res/layout/edit_kind_title.xml
index 619ba49..0f755ee 100644
--- a/res/layout/edit_kind_title.xml
+++ b/res/layout/edit_kind_title.xml
@@ -21,22 +21,23 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingLeft="@dimen/editor_field_left_padding"
-    android:paddingRight="@dimen/editor_field_right_padding"
+    android:minHeight="24dip"
+    android:paddingLeft="8dip"
+    android:paddingRight="8dip"
     android:orientation="vertical">
 
     <TextView
         android:id="@+id/kind_title"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:paddingLeft="@dimen/editor_field_left_padding"
+        android:paddingLeft="8dip"
         android:textAppearance="?android:attr/textAppearanceMedium"
         android:textColor="@color/people_app_theme_color"
         android:textStyle="bold"
+        android:textAllCaps="true"
         android:singleLine="true"
         android:ellipsize="end"
-        android:paddingTop="5dip"
-        android:paddingBottom="2dip" />
+        android:layout_gravity="center_vertical" />
 
     <ImageView
         android:id="@+id/divider"
diff --git a/res/layout/edit_spinner.xml b/res/layout/edit_spinner.xml
index 325eb50..37edcbd 100644
--- a/res/layout/edit_spinner.xml
+++ b/res/layout/edit_spinner.xml
@@ -20,8 +20,8 @@
 <Spinner
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/spinner"
+    android:layout_gravity="top"
     android:layout_width="@dimen/editor_type_label_width"
     android:layout_height="wrap_content"
     android:paddingLeft="5dip"
-    android:paddingRight="20dip"
-    android:textAppearance="?android:attr/textAppearanceSmall"/>
\ No newline at end of file
+    android:paddingRight="20dip"/>
\ No newline at end of file
diff --git a/res/layout/editor_account_header.xml b/res/layout/editor_account_header.xml
index fbce1f9..5181708 100644
--- a/res/layout/editor_account_header.xml
+++ b/res/layout/editor_account_header.xml
@@ -16,11 +16,16 @@
 
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/account_container"
     android:layout_height="wrap_content"
     android:layout_width="match_parent"
+    android:minHeight="48dip"
+    android:background="#EEEEEE"
     android:orientation="horizontal"
-    android:paddingLeft="10dip"
-    android:paddingRight="10dip">
+    android:paddingTop="8dip"
+    android:paddingBottom="8dip"
+    android:paddingLeft="16dip"
+    android:paddingRight="16dip">
 
     <LinearLayout
         android:id="@+id/account"
@@ -53,8 +58,8 @@
 
         <ImageView
              android:id="@+id/account_icon"
-             android:layout_width="45dip"
-             android:layout_height="45dip"
+             android:layout_width="32dip"
+             android:layout_height="32dip"
              android:layout_gravity="center_vertical" />
 
     </FrameLayout>
diff --git a/res/layout/event_field_editor_view.xml b/res/layout/event_field_editor_view.xml
index 0dceafc..6903772 100644
--- a/res/layout/event_field_editor_view.xml
+++ b/res/layout/event_field_editor_view.xml
@@ -35,10 +35,14 @@
             android:id="@+id/date_view"
             layout="@layout/edit_date_picker" />
 
-        <include
+        <Spinner
             android:id="@+id/spinner"
-            layout="@layout/edit_spinner"
-            android:visibility="gone" />
+            android:layout_width="@dimen/editor_type_label_width"
+            android:layout_height="wrap_content"
+            android:paddingLeft="5dip"
+            android:paddingRight="20dip"
+            android:layout_gravity="bottom"
+            android:visibility="gone"/>
 
         <include
             android:id="@+id/delete_button_container"
diff --git a/res/layout/external_raw_contact_editor_view.xml b/res/layout/external_raw_contact_editor_view.xml
index 661371d..6f39b34 100644
--- a/res/layout/external_raw_contact_editor_view.xml
+++ b/res/layout/external_raw_contact_editor_view.xml
@@ -19,90 +19,54 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal"
-    android:paddingBottom="10dip">
+    android:orientation="vertical">
 
-    <!-- Left side color bar -->
-    <ImageView
-        android:id="@+id/color_bar"
-        android:layout_width="4dip"
-        android:layout_height="match_parent"
-        android:visibility="gone"/>
+    <include
+        layout="@layout/editor_account_header" />
 
-    <!-- The content -->
     <LinearLayout
-        android:layout_width="0dip"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
-        android:orientation="vertical">
+        android:layout_width="match_parent"
+        android:orientation="horizontal"
+        android:paddingLeft="16dip"
+        android:paddingRight="16dip">
 
-        <!-- Account info header -->
-        <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"/>
+        <TextView android:id="@+id/read_only_name"
+            android:layout_width="0dip"
+            android:layout_height="match_parent"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:singleLine="true"
+            android:ellipsize="end"
+            android:textAppearance="?android:attr/textAppearanceMedium"
+            android:textColor="?android:attr/textColorSecondary"
+            android:textStyle="bold"/>
 
-        <TextView
-            android:id="@+id/read_only_warning"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:paddingTop="10dip"
-            android:paddingLeft="10dip"
-            android:paddingRight="10dip"
-            android:textAppearance="?android:attr/textAppearanceSmall"
-            android:textColor="?android:attr/textColorTertiary"/>
+        <FrameLayout
+            android:id="@+id/stub_photo"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content">
 
-        <include
-            android:id="@+id/account_header"
-            layout="@layout/editor_account_header" />
+            <include
+                android:id="@+id/edit_photo"
+                layout="@layout/item_photo_editor" />
 
-        <LinearLayout
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="horizontal"
-            android:paddingTop="20dip"
-            android:paddingLeft="10dip"
-            android:paddingRight="10dip">
-
-            <TextView android:id="@+id/read_only_name"
-                android:layout_width="0dip"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:gravity="center_vertical"
-                android:singleLine="true"
-                android:ellipsize="end"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:textColor="?android:attr/textColorTertiary"
-                android:textStyle="bold"/>
-
-            <FrameLayout
-                android:id="@+id/stub_photo"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content">
-
-                <include
-                    android:id="@+id/edit_photo"
-                    layout="@layout/item_photo_editor" />
-
-            </FrameLayout>
-
-        </LinearLayout>
-
-        <Button
-            android:id="@+id/button_edit_externally"
-            android:text="@string/edit_contact"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginTop="13dip"
-            android:layout_marginBottom="13dip"
-            android:layout_marginLeft="13dip"/>
-
-        <LinearLayout android:id="@+id/sect_general"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:orientation="vertical"/>
+        </FrameLayout>
 
     </LinearLayout>
 
+    <Button
+        android:id="@+id/button_edit_externally"
+        android:text="@string/edit_contact"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="13dip"
+        android:layout_marginBottom="13dip"
+        android:layout_marginLeft="13dip"/>
+
+    <LinearLayout android:id="@+id/sect_general"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"/>
+
 </com.android.contacts.editor.ExternalRawContactEditorView>
diff --git a/res/layout/item_group_membership.xml b/res/layout/item_group_membership.xml
index 62d06ea..b6d11f2 100644
--- a/res/layout/item_group_membership.xml
+++ b/res/layout/item_group_membership.xml
@@ -34,6 +34,6 @@
         android:gravity="left|center_vertical"
         android:ellipsize="end"
         android:focusable="true"
-        android:paddingLeft="@dimen/editor_field_left_padding" />
+        android:paddingLeft="16dip" />
 
 </com.android.contacts.editor.GroupMembershipView>
diff --git a/res/layout/item_kind_section.xml b/res/layout/item_kind_section.xml
index 0b6017c..157ca1c 100644
--- a/res/layout/item_kind_section.xml
+++ b/res/layout/item_kind_section.xml
@@ -20,7 +20,6 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingBottom="@dimen/editor_field_bottom_padding"
     android:orientation="vertical">
 
     <include
diff --git a/res/layout/item_photo_editor.xml b/res/layout/item_photo_editor.xml
index 3590963..2e73cb2 100644
--- a/res/layout/item_photo_editor.xml
+++ b/res/layout/item_photo_editor.xml
@@ -36,6 +36,6 @@
         android:clickable="true"
         android:focusable="true"
         android:contentDescription="@string/description_contact_photo"
-        android:background="@drawable/change_photo_box_holo_light"
+        android:background="?android:attr/selectableItemBackground"
     />
 </view>
diff --git a/res/layout/item_read_only_field.xml b/res/layout/item_read_only_field.xml
index 9e0967e..03778cc 100644
--- a/res/layout/item_read_only_field.xml
+++ b/res/layout/item_read_only_field.xml
@@ -16,37 +16,20 @@
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
-    android:layout_height="?android:attr/listPreferredItemHeight"
+    android:layout_height="wrap_content"
+    android:orientation="vertical">
 
-    android:orientation="vertical"
->
-
-    <TextView android:id="@+id/label"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="10dip"
-        android:layout_marginTop="2dip"
-
-        android:textAppearance="?android:attr/textAppearanceLarge"
-        android:singleLine="true"
-    />
+    <include
+        android:id="@+id/kind_title_layout"
+        layout="@layout/edit_kind_title" />
 
     <TextView android:id="@+id/data"
         android:layout_width="wrap_content"
         android:layout_height="0px"
         android:layout_weight="1"
-        android:layout_marginLeft="10dip"
-        android:layout_marginBottom="4dip"
-
+        android:layout_marginLeft="16dip"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:singleLine="true"
-    />
-
-    <View
-        android:layout_width="match_parent"
-        android:layout_height="1px"
-
-        android:background="?android:attr/listDivider"
-    />
+        android:textColor="?android:attr/textColorSecondary"
+        android:singleLine="true"/>
 
 </LinearLayout>
\ No newline at end of file
diff --git a/res/layout/organization_editor_view_switcher.xml b/res/layout/organization_editor_view_switcher.xml
index c6e16ae..fb21626 100644
--- a/res/layout/organization_editor_view_switcher.xml
+++ b/res/layout/organization_editor_view_switcher.xml
@@ -23,19 +23,22 @@
 <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingLeft="@dimen/editor_field_left_padding"
-    android:paddingRight="@dimen/editor_field_right_padding"
+    android:minHeight="48dip"
     android:background="?android:attr/selectableItemBackground">
 
     <TextView
         android:id="@+id/add_organization_button"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:paddingLeft="@dimen/editor_field_left_padding"
+        android:paddingLeft="16dip"
+        android:paddingRight="16dip"
+        android:layout_gravity="center_vertical"
+        android:duplicateParentState="true"
         android:textAppearance="?android:attr/textAppearanceMedium"
-        android:text="@string/organizationLabelsGroup"
-        android:duplicateParentState="true"/>
+        android:textColor="?android:attr/textColorSecondary"
+        android:text="@string/add_organization"/>
 
+    <!-- This is later populated with the actual editable text fields for "organization" -->
     <FrameLayout
         android:id="@+id/container"
         android:layout_width="match_parent"
diff --git a/res/layout/phonetic_name_editor_view.xml b/res/layout/phonetic_name_editor_view.xml
index 832ca2c..6084d3f 100644
--- a/res/layout/phonetic_name_editor_view.xml
+++ b/res/layout/phonetic_name_editor_view.xml
@@ -18,7 +18,6 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:paddingBottom="@dimen/editor_field_bottom_padding"
     android:orientation="vertical">
 
     <include
@@ -29,7 +28,6 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
         android:orientation="horizontal"
         android:gravity="center_vertical"
         android:focusable="true"
diff --git a/res/layout/raw_contact_editor_view.xml b/res/layout/raw_contact_editor_view.xml
index 79183cd..b4aa766 100644
--- a/res/layout/raw_contact_editor_view.xml
+++ b/res/layout/raw_contact_editor_view.xml
@@ -20,58 +20,8 @@
     android:layout_height="wrap_content"
     android:orientation="vertical">
 
-    <LinearLayout
-        android:id="@+id/anchor_for_account_switcher"
-        android:layout_height="wrap_content"
-        android:layout_width="match_parent"
-        android:padding="@dimen/account_header_padding"
-        android:orientation="horizontal">
-
-        <!--
-          TODO: Make this "?android:attr/spinnerStyle" but disable the style if this is not a new
-          contact. Since styles aren't easily toggled dynamically, it's easier to just create a
-          drawable with the spinner triangle as a background asset and just toggle the background.
-        -->
-        <LinearLayout
-            android:id="@+id/account"
-            android:layout_height="wrap_content"
-            android:layout_width="0dip"
-            android:layout_weight="1"
-            android:orientation="vertical"
-            android:background="?android:attr/selectableItemBackground">
-
-            <TextView
-                android:id="@+id/account_type"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:textAppearance="?android:attr/textAppearanceMedium"
-                android:singleLine="true" />
-
-            <TextView
-                 android:id="@+id/account_name"
-                 android:layout_width="wrap_content"
-                 android:layout_height="wrap_content"
-                 android:textAppearance="?android:attr/textAppearanceSmall"
-                 android:textColor="?android:attr/textColorTertiary"
-                 android:singleLine="true" />
-
-        </LinearLayout>
-
-        <FrameLayout
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent">
-
-            <ImageView
-                 android:id="@+id/account_icon"
-                 android:layout_width="32dip"
-                 android:layout_height="32dip"
-                 android:layout_marginLeft="24dip"
-                 android:layout_marginRight="24dip"
-                 android:layout_gravity="center_vertical" />
-
-        </FrameLayout>
-
-    </LinearLayout>
+    <include
+        layout="@layout/editor_account_header" />
 
     <LinearLayout
         android:id="@+id/body"
@@ -82,18 +32,30 @@
         <LinearLayout
             android:layout_height="wrap_content"
             android:layout_width="match_parent"
-            android:layout_marginRight="4dip"
-            android:orientation="horizontal">
+            android:orientation="horizontal"
+            android:paddingTop="8dip">
 
-            <include
-                android:id="@+id/edit_name"
-                layout="@layout/structured_name_editor_view" />
+            <LinearLayout
+                android:layout_height="wrap_content"
+                android:layout_width="0dip"
+                android:layout_weight="1"
+                android:orientation="vertical">
+
+                <include
+                    android:id="@+id/edit_name"
+                    layout="@layout/structured_name_editor_view" />
+
+                <include
+                    android:id="@+id/edit_phonetic_name"
+                    layout="@layout/phonetic_name_editor_view" />
+
+            </LinearLayout>
 
             <FrameLayout
                 android:id="@+id/stub_photo"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:layout_marginRight="16dip">
+                android:layout_marginRight="8dip">
 
                 <include
                     android:id="@+id/edit_photo"
@@ -103,10 +65,6 @@
 
         </LinearLayout>
 
-        <include
-            android:id="@+id/edit_phonetic_name"
-            layout="@layout/phonetic_name_editor_view" />
-
         <ViewStub android:id="@+id/aggregation_suggestion_stub"
             android:inflatedId="@+id/aggregation_suggestion"
             android:layout="@layout/aggregation_suggestions"
@@ -126,8 +84,8 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_gravity="center"
-            android:layout_marginTop="10dip"
-            android:layout_marginBottom="10dip"/>
+            android:layout_marginTop="16dip"
+            android:layout_marginBottom="32dip"/>
 
     </LinearLayout>
 </com.android.contacts.editor.RawContactEditorView>
diff --git a/res/layout/structured_name_editor_view.xml b/res/layout/structured_name_editor_view.xml
index 3a66d5e..979a0f3 100644
--- a/res/layout/structured_name_editor_view.xml
+++ b/res/layout/structured_name_editor_view.xml
@@ -16,9 +16,8 @@
 
 <com.android.contacts.editor.StructuredNameEditorView
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="0dip"
+    android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:layout_weight="1"
     android:orientation="vertical">
 
     <include
@@ -29,7 +28,6 @@
     <LinearLayout
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_weight="1"
         android:orientation="horizontal"
         android:focusable="true"
         android:clickable="true">
diff --git a/res/layout/text_fields_editor_view.xml b/res/layout/text_fields_editor_view.xml
index c8d35a4..89970c6 100644
--- a/res/layout/text_fields_editor_view.xml
+++ b/res/layout/text_fields_editor_view.xml
@@ -34,13 +34,13 @@
             layout="@layout/edit_field_list" />
 
         <include
-            android:id="@+id/spinner"
-            layout="@layout/edit_spinner"
+            android:id="@+id/expansion_view_container"
+            layout="@layout/edit_expansion_view"
             android:visibility="gone" />
 
         <include
-            android:id="@+id/expansion_view_container"
-            layout="@layout/edit_expansion_view"
+            android:id="@+id/spinner"
+            layout="@layout/edit_spinner"
             android:visibility="gone" />
 
         <include
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index a4a6112..ae2bed5 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -25,7 +25,6 @@
 
     <dimen name="aggregation_suggestion_icon_size">40dip</dimen>
 
-    <dimen name="account_header_padding">10dip</dimen>
     <dimen name="account_selector_popup_width">400dip</dimen>
 
     <dimen name="photo_action_popup_width">400dip</dimen>
@@ -37,17 +36,17 @@
     <!-- Padding of the rounded plus/minus/expand/collapse buttons in the editor  -->
     <dimen name="editor_round_button_padding_left">2dip</dimen>
     <dimen name="editor_round_button_padding_right">2dip</dimen>
-    <dimen name="editor_round_button_padding_top">8dip</dimen>
-    <dimen name="editor_round_button_padding_bottom">8dip</dimen>
+    <dimen name="editor_round_button_padding_top">4dip</dimen>
+    <dimen name="editor_round_button_padding_bottom">4dip</dimen>
 
     <!-- Width of the Type-Label in the Editor -->
     <dimen name="editor_type_label_width">100dip</dimen>
 
     <!-- Left padding of a field in the Editor -->
-    <dimen name="editor_field_left_padding">5dip</dimen>
+    <dimen name="editor_field_left_padding">4dip</dimen>
 
     <!-- Right padding of a field in the Editor -->
-    <dimen name="editor_field_right_padding">5dip</dimen>
+    <dimen name="editor_field_right_padding">4dip</dimen>
 
     <!-- Top padding of a field in the Editor -->
     <dimen name="editor_field_top_padding">10dip</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 5bb6c2b..5aada70 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1292,8 +1292,8 @@
     <!-- Checkbox asking the user if they want to display a particular photo for a contact -->
     <string name="use_photo_as_primary">Use this photo</string>
 
-    <!-- Text used to explain that a contact cannot be edited since the data is read only [CHAR LIMIT=40] -->
-    <string name="contact_read_only">Not editable on this device</string>
+    <!-- Text used to explain that a contact cannot be edited from the People application since the data is read only [CHAR LIMIT=40] -->
+    <string name="contact_read_only">Not editable from this application</string>
 
     <!-- Text describing that a contact has no information available other than name and photo -->
     <string name="no_contact_details">No additional information for this contact</string>
@@ -1386,6 +1386,9 @@
     <!-- The button to add another entry of a specific data type (i.e. email, phone, address) to a contact in the Raw Contact Editor [CHAR LIMIT=22] -->
     <string name="add_new_entry_for_section">Add new</string>
 
+    <!-- The button to add an organization field to a contact in the Raw Contact Editor [CHAR LIMIT=22] -->
+    <string name="add_organization">Add organization</string>
+
     <!-- Attbution of a contact status update, when the time of update is unknown -->
     <string name="contact_status_update_attribution">via <xliff:g id="source" example="Google Talk">%1$s</xliff:g></string>
 
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c125698..c2d10e0 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -79,9 +79,12 @@
         <item name="android:textColorPrimary">@color/primary_text_color</item>
         <item name="android:textColorSecondary">@color/secondary_text_color</item>
     </style>
-    <style name="ContactEditorActivityTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
+
+    <style name="EditorActivityTheme" parent="@android:style/Theme.Holo.Light.DarkActionBar">
         <item name="android:actionBarStyle">@style/ContactsActionBarStyle</item>
         <item name="android:windowContentOverlay">@null</item>
+        <item name="android:textColorPrimary">@color/primary_text_color</item>
+        <item name="android:textColorSecondary">@color/secondary_text_color</item>
     </style>
 
     <style name="BackgroundOnly">