diff --git a/res/layout-xlarge/contact_editor_activity.xml b/res/layout-xlarge/contact_editor_activity.xml
new file mode 100644
index 0000000..906152c
--- /dev/null
+++ b/res/layout-xlarge/contact_editor_activity.xml
@@ -0,0 +1,45 @@
+<?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.
+-->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="600dip"
+    android:layout_height="match_parent"
+    android:orientation="vertical">
+
+    <fragment android:name="com.android.contacts.views.editor.ContactEditorFragment"
+            android:id="@+id/contact_editor_fragment"
+            android:layout_width="match_parent"
+            android:layout_height="0px"
+            android:layout_weight="1" />
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="50dip"
+        android:orientation="horizontal"
+        android:gravity="center_horizontal">
+
+        <Button
+            android:id="@+id/done"
+            android:layout_width="150dip"
+            android:layout_height="match_parent"
+            android:text="@string/menu_done" />
+        <Button
+            android:id="@+id/revert"
+            android:layout_width="150dip"
+            android:layout_height="match_parent"
+            android:text="@string/menu_doNotSave" />
+    </LinearLayout>
+</LinearLayout>
diff --git a/res/layout/item_contact_editor.xml b/res/layout/item_contact_editor.xml
index 7566b37..b75c82a 100644
--- a/res/layout/item_contact_editor.xml
+++ b/res/layout/item_contact_editor.xml
@@ -14,7 +14,6 @@
      limitations under the License.
 -->
 
-<!-- placed inside act_edit -->
 <com.android.contacts.ui.widget.ContactEditorView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
diff --git a/res/values-xlarge/styles.xml b/res/values-xlarge/styles.xml
index 3f773f9..cc8682f 100644
--- a/res/values-xlarge/styles.xml
+++ b/res/values-xlarge/styles.xml
@@ -21,5 +21,7 @@
     </style>
     <style name="ContactsPreferencesTheme" parent="@android:Theme.Dialog">
     </style>
-
+    <style name="TallTitleBarTheme" parent="@android:Theme.Dialog">
+        <item name="android:windowContentOverlay">@null</item>
+    </style>
 </resources>
diff --git a/res/values/ids.xml b/res/values/ids.xml
index 309119f..25ea72b 100644
--- a/res/values/ids.xml
+++ b/res/values/ids.xml
@@ -69,4 +69,7 @@
     <!-- For PhoneNumberMessageSendInteraction -->
     <item type="id" name="dialog_phone_number_message_disambiguation"/>
 
+    <!-- Dialog Manager Ids -->
+    <item type="id" name="dialog_manager_id_1"/>
+    <item type="id" name="dialog_manager_id_2"/>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f4f962c..b7df91f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -107,10 +107,10 @@
     
     <style name="ContactBrowserTheme" parent="@android:Theme">
     </style>
-    
+
     <style name="ContactPickerTheme" parent="@android:Theme">
     </style>
-    
+
     <style name="ContactsPreferencesTheme" parent="@android:Theme">
     </style>
 </resources>
diff --git a/src/com/android/contacts/activities/ContactBrowserActivity.java b/src/com/android/contacts/activities/ContactBrowserActivity.java
index d05f2b1..c94907e 100644
--- a/src/com/android/contacts/activities/ContactBrowserActivity.java
+++ b/src/com/android/contacts/activities/ContactBrowserActivity.java
@@ -72,11 +72,7 @@
     private static final int SUBACTIVITY_DISPLAY_GROUP = 3;
     private static final int SUBACTIVITY_SEARCH = 4;
 
-    private static final int DIALOG_MANAGER_ID_1 = 1;
-    private static final int DIALOG_MANAGER_ID_2 = 2;
-
-    private DialogManager mDialogManager = new DialogManager(this, DIALOG_MANAGER_ID_1,
-            DIALOG_MANAGER_ID_2);
+    private DialogManager mDialogManager = new DialogManager(this);
 
     private ContactsIntentResolver mIntentResolver;
     private ContactsRequest mRequest;
@@ -642,9 +638,7 @@
 
     @Override
     protected Dialog onCreateDialog(int id, Bundle bundle) {
-        if (id == DIALOG_MANAGER_ID_1 || id == DIALOG_MANAGER_ID_2) {
-            return mDialogManager.onCreateDialog(id, bundle);
-        }
+        if (DialogManager.isManagedId(id)) return mDialogManager.onCreateDialog(id, bundle);
 
         Dialog dialog = getContactDeletionInteraction().onCreateDialog(id, bundle);
         if (dialog != null) {
diff --git a/src/com/android/contacts/activities/ContactEditorActivity.java b/src/com/android/contacts/activities/ContactEditorActivity.java
index 4369160..e3780b4 100644
--- a/src/com/android/contacts/activities/ContactEditorActivity.java
+++ b/src/com/android/contacts/activities/ContactEditorActivity.java
@@ -18,6 +18,7 @@
 
 import com.android.contacts.ContactsSearchManager;
 import com.android.contacts.R;
+import com.android.contacts.util.DialogManager;
 import com.android.contacts.views.editor.ContactEditorFragment;
 
 import android.app.Activity;
@@ -25,12 +26,20 @@
 import android.content.Intent;
 import android.os.Bundle;
 import android.util.Log;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
 import android.widget.Toast;
 
-public class ContactEditorActivity extends Activity {
+public class ContactEditorActivity extends Activity implements
+        DialogManager.DialogShowingViewActivity {
     private static final String TAG = "ContactEditorActivity";
 
     private ContactEditorFragment mFragment;
+    private Button mDoneButton;
+    private Button mRevertButton;
+
+    private DialogManager mDialogManager = new DialogManager(this);
 
     @Override
     public void onCreate(Bundle savedState) {
@@ -43,11 +52,29 @@
         mFragment.load(getIntent().getAction(), getIntent().getData(),
                 getIntent().resolveType(getContentResolver()), getIntent().getExtras());
 
+        // Depending on the use-case, this activity has Done and Revert buttons or not.
+        mDoneButton = (Button) findViewById(R.id.done);
+        mRevertButton = (Button) findViewById(R.id.revert);
+        if (mDoneButton != null) mDoneButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                mFragment.save();
+            }
+        });
+        if (mRevertButton != null) mRevertButton.setOnClickListener(new OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                finish();
+            }
+        });
+
         Log.i(TAG, getIntent().getData().toString());
     }
 
     @Override
     protected Dialog onCreateDialog(int id, Bundle args) {
+        if (DialogManager.isManagedId(id)) return mDialogManager.onCreateDialog(id, args);
+
         // ask the Fragment whether it knows about the dialog
         final Dialog fragmentResult = mFragment.onCreateDialog(id, args);
         if (fragmentResult != null) return fragmentResult;
@@ -77,31 +104,27 @@
 
         @Override
         public void closeAfterRevert() {
-            Toast.makeText(ContactEditorActivity.this, "closeAfterRevert",
-                    Toast.LENGTH_LONG).show();
+            finish();
         }
 
         @Override
         public void closeAfterSaving(int resultCode, Intent resultIntent) {
-            Toast.makeText(ContactEditorActivity.this, "closeAfterSaving",
-                    Toast.LENGTH_LONG).show();
+            finish();
         }
 
         @Override
         public void closeAfterSplit() {
-            Toast.makeText(ContactEditorActivity.this, "closeAfterSplit", Toast.LENGTH_LONG).show();
+            finish();
         }
 
         @Override
         public void closeBecauseAccountSelectorAborted() {
-            Toast.makeText(ContactEditorActivity.this, "closeBecauseAccountSelectorAborted",
-                    Toast.LENGTH_LONG).show();
+            finish();
         }
 
         @Override
         public void closeBecauseContactNotFound() {
-            Toast.makeText(ContactEditorActivity.this, "closeBecauseContactNotFound",
-                    Toast.LENGTH_LONG).show();
+            finish();
         }
 
         @Override
@@ -109,4 +132,9 @@
             Toast.makeText(ContactEditorActivity.this, "setTitleTo", Toast.LENGTH_LONG).show();
         }
     };
+
+    @Override
+    public DialogManager getDialogManager() {
+        return mDialogManager;
+    }
 }
diff --git a/src/com/android/contacts/util/DialogManager.java b/src/com/android/contacts/util/DialogManager.java
index 4c6baf3..42a35a7 100644
--- a/src/com/android/contacts/util/DialogManager.java
+++ b/src/com/android/contacts/util/DialogManager.java
@@ -16,6 +16,8 @@
 
 package com.android.contacts.util;
 
+import com.android.contacts.R;
+
 import android.app.Activity;
 import android.app.Dialog;
 import android.content.DialogInterface;
@@ -41,23 +43,20 @@
  */
 public class DialogManager {
     private final Activity mActivity;
-    private final int mDialogId1;
-    private final int mDialogId2;
     private boolean mUseDialogId2 = false;
     public final static String VIEW_ID_KEY = "view_id";
 
+    public static final boolean isManagedId(int id) {
+        return (id == R.id.dialog_manager_id_1) || (id == R.id.dialog_manager_id_2);
+    }
+
     /**
      * Creates a new instance of this class for the given Activity.
      * @param activity The activity this object is used for
-     * @param dialogId1 The first Id that is reserved for use by child-views
-     * @param dialogId2 The second Id that is reserved for use by child-views
      */
-    public DialogManager(final Activity activity, final int dialogId1, final int dialogId2) {
+    public DialogManager(final Activity activity) {
         if (activity == null) throw new IllegalArgumentException("activity must not be null");
-        if (dialogId1 == dialogId2) throw new IllegalArgumentException("Ids must be different");
         mActivity = activity;
-        mDialogId1 = dialogId1;
-        mDialogId2 = dialogId2;
     }
 
     /**
@@ -75,7 +74,7 @@
             throw new IllegalArgumentException("View does not have a proper ViewId");
         }
         bundle.putInt(VIEW_ID_KEY, viewId);
-        int dialogId = mUseDialogId2 ? mDialogId2 : mDialogId1;
+        int dialogId = mUseDialogId2 ? R.id.dialog_manager_id_2 : R.id.dialog_manager_id_1;
         mActivity.showDialog(dialogId, bundle);
     }
 
@@ -84,9 +83,9 @@
      * This function returns null if the id is not one of the two reserved Ids.
      */
     public Dialog onCreateDialog(final int id, final Bundle bundle) {
-        if (id == mDialogId1) {
+        if (id == R.id.dialog_manager_id_1) {
             mUseDialogId2 = true;
-        } else if (id == mDialogId2) {
+        } else if (id == R.id.dialog_manager_id_2) {
             mUseDialogId2 = false;
         } else {
             return null;
diff --git a/tests/res/values/donottranslate_strings.xml b/tests/res/values/donottranslate_strings.xml
index 93095e3..21a8e7a 100644
--- a/tests/res/values/donottranslate_strings.xml
+++ b/tests/res/values/donottranslate_strings.xml
@@ -72,6 +72,13 @@
         <item>EDIT (create new contact)</item>
         <item>EDIT (create new raw contact)</item>
         <item>EDIT (create new legacy)</item>
+
+        <!-- View Contact -->
+        <item>VIEW (content uri with only id)</item>
+        <item>VIEW (lookup uri without id)</item>
+        <item>VIEW (lookup uri)</item>
+        <item>VIEW (called for raw contact)</item>
+        <item>VIEW (legacy style uri)</item>
     </string-array>
 
     <string name="pinnedHeaderList">Pinned Headers</string>
diff --git a/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
index 7af7dfc..94f2aad 100644
--- a/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
+++ b/tests/src/com/android/contacts/tests/allintents/AllIntentsActivity.java
@@ -111,6 +111,12 @@
     private static final int EDIT_NEW_RAW_CONTACT = 48;
     private static final int EDIT_NEW_LEGACY = 49;
 
+    private static final int VIEW_CONTACT = 50;
+    private static final int VIEW_CONTACT_LOOKUP = 51;
+    private static final int VIEW_CONTACT_LOOKUP_ID = 52;
+    private static final int VIEW_RAW_CONTACT = 53;
+    private static final int VIEW_LEGACY = 54;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -423,6 +429,49 @@
                 startActivity(new Intent(Intent.ACTION_INSERT, legacyContentUri));
                 break;
             }
+            case VIEW_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_CONTACT_LOOKUP: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final String lookupKey = lookupUri.getPathSegments().get(2);
+                final Uri lookupWithoutIdUri = Uri.withAppendedPath(Contacts.CONTENT_LOOKUP_URI,
+                        lookupKey);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, lookupWithoutIdUri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_CONTACT_LOOKUP_ID: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final Uri uri = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId);
+                final Uri lookupUri = Contacts.getLookupUri(getContentResolver(), uri);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, lookupUri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_RAW_CONTACT: {
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(RawContacts.CONTENT_URI, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
+            case VIEW_LEGACY: {
+                final Uri legacyContentUri = Uri.parse("content://contacts/people");
+                final long contactId = findArbitraryContactWithPhoneNumber();
+                final long rawContactId = findArbitraryRawContactOfContact(contactId);
+                final Uri uri = ContentUris.withAppendedId(legacyContentUri, rawContactId);
+                final Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+                startActivity(intent);
+                break;
+            }
             default: {
                 Toast.makeText(this, "Sorry, we forgot to write this...", Toast.LENGTH_LONG).show();
             }
