diff --git a/src/com/android/contacts/editor/EditorAnimator.java b/src/com/android/contacts/editor/EditorAnimator.java
index 2e17e23..251357a 100644
--- a/src/com/android/contacts/editor/EditorAnimator.java
+++ b/src/com/android/contacts/editor/EditorAnimator.java
@@ -47,7 +47,15 @@
 
     private AnimatorRunner mRunner = new AnimatorRunner();
 
+    public void hideEditorView(final View victim) {
+        removeEditorView(victim, /* removeVictimFromParent =*/ false);
+    }
+
     public void removeEditorView(final View victim) {
+        removeEditorView(victim, /* removeVictimFromParent =*/ true);
+    }
+
+    private void removeEditorView(final View victim, final boolean removeVictimFromParent) {
         mRunner.endOldAnimation();
         final int offset = victim.getHeight();
 
@@ -71,11 +79,15 @@
                     final View view = viewsToMove.get(i);
                     view.setTranslationY(0.0f);
                 }
-                // Remove our target view (if parent is null, we were run several times by quick
-                // fingers. Just ignore)
-                final ViewGroup victimParent = (ViewGroup) victim.getParent();
-                if (victimParent != null) {
-                    victimParent.removeView(victim);
+                if (removeVictimFromParent) {
+                    // Remove our target view (if parent is null, we were run several times by quick
+                    // fingers. Just ignore)
+                    final ViewGroup victimParent = (ViewGroup) victim.getParent();
+                    if (victimParent != null) {
+                        victimParent.removeView(victim);
+                    }
+                } else {
+                    victim.setVisibility(View.GONE);
                 }
             }
         });
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index b60ae5c..cf94d8f 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -254,7 +254,16 @@
      */
     public void showType() {
         if (mHasTypes && mLabel != null && mLabel.getVisibility() != View.VISIBLE) {
-            mLabel.setVisibility(View.VISIBLE);
+            EditorAnimator.getInstance().slideAndFadeIn(mLabel, mLabel.getHeight());
+        }
+    }
+
+    /**
+     * Hides the type drop down if there are types to display and it is not already hidden.
+     */
+    public void hideType() {
+        if (mHasTypes && mLabel != null && mLabel.getVisibility() != View.GONE) {
+            EditorAnimator.getInstance().hideEditorView(mLabel);
         }
     }
 
diff --git a/src/com/android/contacts/editor/TextFieldsEditorView.java b/src/com/android/contacts/editor/TextFieldsEditorView.java
index 6f24bb9..9345434 100644
--- a/src/com/android/contacts/editor/TextFieldsEditorView.java
+++ b/src/com/android/contacts/editor/TextFieldsEditorView.java
@@ -159,7 +159,11 @@
                 getEditorListener().onRequest(EditorListener.EDITOR_FOCUS_CHANGED);
             }
             if (foundFocus && !isTypeVisible()) {
+                // We just got focus and the types are not visible
                 showType();
+            } else if (isEmpty()) {
+                // We just lost focus and the field is empty
+                hideType();
             }
             // Rebuild the label spinner using the new colors.
             rebuildLabel();
