diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java
index fc63690..d4ba6a2 100644
--- a/src/com/android/dialer/DialtactsActivity.java
+++ b/src/com/android/dialer/DialtactsActivity.java
@@ -49,17 +49,12 @@
 import android.view.View;
 import android.view.View.OnDragListener;
 import android.view.View.OnTouchListener;
-import android.view.animation.AccelerateInterpolator;
 import android.view.animation.Animation;
-import android.view.animation.Animation.AnimationListener;
 import android.view.animation.AnimationUtils;
-import android.view.animation.DecelerateInterpolator;
-import android.view.animation.Interpolator;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.AbsListView.OnScrollListener;
 import android.widget.EditText;
 import android.widget.ImageButton;
-import android.widget.ImageView;
 import android.widget.PopupMenu;
 import android.widget.RelativeLayout;
 import android.widget.Toast;
@@ -84,7 +79,6 @@
 import com.android.dialer.list.SpeedDialFragment;
 import com.android.dialer.list.PhoneFavoriteSquareTileView;
 import com.android.dialer.list.RegularSearchFragment;
-import com.android.dialer.list.RemoveView;
 import com.android.dialer.list.SearchFragment;
 import com.android.dialer.list.SmartDialSearchFragment;
 import com.android.dialer.widget.ActionBarController;
@@ -197,13 +191,6 @@
     private EditText mSearchView;
     private View mVoiceSearchButton;
 
-    /**
-     * View that contains the "Remove" dialog that shows up when the user long presses a contact.
-     * If the user releases a contact when hovering on top of this, the contact is unfavorited and
-     * removed from the speed dial list.
-     */
-    private View mRemoveViewContainer;
-
     private String mSearchQuery;
 
     private DialerDatabaseHelper mDialerDatabaseHelper;
@@ -238,8 +225,7 @@
         @Override
         public boolean onDrag(View v, DragEvent event) {
             if (event.getAction() == DragEvent.ACTION_DRAG_LOCATION) {
-                mDragDropController.handleDragHovered(v, (int) event.getX(),
-                        (int) event.getY());
+                mDragDropController.handleDragHovered(v, (int) event.getX(), (int) event.getY());
             }
             return true;
         }
@@ -395,8 +381,6 @@
         mFloatingActionButton = (ImageButton) findViewById(R.id.floating_action_button);
         mFloatingActionButton.setOnClickListener(this);
 
-        mRemoveViewContainer = findViewById(R.id.remove_view_container);
-
         mDialerDatabaseHelper = DatabaseHelperManager.getDatabaseHelper(this);
         SmartDialPrefix.initializeNanpSettings(this);
     }
@@ -1006,9 +990,9 @@
     @Override
     public void onDragStarted(int x, int y, PhoneFavoriteSquareTileView view) {
         if (mListsFragment.isPaneOpen()) {
-            mActionBarController.slideActionBarUp(true);
+            mActionBarController.setAlpha(ListsFragment.REMOVE_VIEW_SHOWN_ALPHA);
         }
-        mRemoveViewContainer.setVisibility(View.VISIBLE);
+        mListsFragment.showRemoveView(true);
     }
 
     @Override
@@ -1021,9 +1005,9 @@
     @Override
     public void onDragFinished(int x, int y) {
         if (mListsFragment.isPaneOpen()) {
-            mActionBarController.slideActionBarDown(true);
+            mActionBarController.setAlpha(ListsFragment.REMOVE_VIEW_HIDDEN_ALPHA);
         }
-        mRemoveViewContainer.setVisibility(View.GONE);
+        mListsFragment.showRemoveView(false);
     }
 
     @Override
@@ -1036,8 +1020,7 @@
     @Override
     public void setDragDropController(DragDropController dragController) {
         mDragDropController = dragController;
-        ((RemoveView) findViewById(R.id.remove_view))
-                .setDragDropController(dragController);
+        mListsFragment.getRemoveView().setDragDropController(dragController);
     }
 
     @Override
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index ab790ed..bdd2d6c 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -68,6 +68,9 @@
     private static final String KEY_LAST_DISMISSED_CALL_SHORTCUT_DATE =
             "key_last_dismissed_call_shortcut_date";
 
+    public static final float REMOVE_VIEW_SHOWN_ALPHA = 0.5f;
+    public static final float REMOVE_VIEW_HIDDEN_ALPHA = 1;
+
     // Used with LoaderManager
     private static int MISSED_CALL_LOADER = 1;
 
@@ -81,6 +84,8 @@
     private ViewPagerTabs mViewPagerTabs;
     private ViewPagerAdapter mViewPagerAdapter;
     private ListView mShortcutCardsListView;
+    private RemoveView mRemoveView;
+    private View mRemoveViewContent;
     private SpeedDialFragment mSpeedDialFragment;
     private CallLogFragment mRecentsFragment;
     private AllContactsFragment mAllContactsFragment;
@@ -267,6 +272,9 @@
         mShortcutCardsListView = (ListView) parentView.findViewById(R.id.shortcut_card_list);
         mShortcutCardsListView.setAdapter(mMergedAdapter);
 
+        mRemoveView = (RemoveView) parentView.findViewById(R.id.remove_view);
+        mRemoveViewContent = parentView.findViewById(R.id.remove_view_content);
+
         setupPaneLayout((OverlappingPaneLayout) parentView);
 
         return parentView;
@@ -335,6 +343,19 @@
         }
     }
 
+    public void showRemoveView(boolean show) {
+        mRemoveViewContent.setVisibility(show ? View.VISIBLE : View.GONE);
+        mRemoveView.setAlpha(show ? 0 : 1);
+        mRemoveView.animate().alpha(show ? 1 : 0).start();
+
+        if (mShortcutCardsListView.getCount() > 0) {
+            View v = mShortcutCardsListView.getChildAt(0);
+            v.animate().withLayer()
+                    .alpha(show ? REMOVE_VIEW_SHOWN_ALPHA : REMOVE_VIEW_HIDDEN_ALPHA)
+                    .start();
+        }
+    }
+
     public boolean shouldShowActionBar() {
         return mIsPanelOpen && mActionBar != null;
     }
@@ -361,4 +382,8 @@
     public SpeedDialFragment getSpeedDialFragment() {
         return mSpeedDialFragment;
     }
+
+    public RemoveView getRemoveView() {
+        return mRemoveView;
+    }
 }
diff --git a/src/com/android/dialer/list/RemoveView.java b/src/com/android/dialer/list/RemoveView.java
index ae358fc..fdb08f6 100644
--- a/src/com/android/dialer/list/RemoveView.java
+++ b/src/com/android/dialer/list/RemoveView.java
@@ -21,7 +21,6 @@
     int mUnhighlightedColor;
     int mHighlightedColor;
     Drawable mRemoveDrawable;
-    Drawable mRemoveHighlightedDrawable;
 
     public RemoveView(Context context) {
       super(context);
@@ -43,7 +42,6 @@
         mUnhighlightedColor = r.getColor(R.color.remove_text_color);
         mHighlightedColor = r.getColor(R.color.remove_highlighted_text_color);
         mRemoveDrawable = r.getDrawable(R.drawable.ic_remove);
-        mRemoveHighlightedDrawable = r.getDrawable(R.drawable.ic_remove_highlight);
     }
 
     public void setDragDropController(DragDropController controller) {
@@ -79,13 +77,13 @@
 
     private void setAppearanceNormal() {
         mRemoveText.setTextColor(mUnhighlightedColor);
-        mRemoveIcon.setImageDrawable(mRemoveDrawable);
+        mRemoveIcon.setColorFilter(mUnhighlightedColor);
         invalidate();
     }
 
     private void setAppearanceHighlighted() {
         mRemoveText.setTextColor(mHighlightedColor);
-        mRemoveIcon.setImageDrawable(mRemoveHighlightedDrawable);
+        mRemoveIcon.setColorFilter(mHighlightedColor);
         invalidate();
     }
 }
diff --git a/src/com/android/dialer/widget/ActionBarController.java b/src/com/android/dialer/widget/ActionBarController.java
index 67037a2..0e94df4 100644
--- a/src/com/android/dialer/widget/ActionBarController.java
+++ b/src/com/android/dialer/widget/ActionBarController.java
@@ -187,6 +187,10 @@
         mIsActionBarSlidUp = false;
     }
 
+    public void setAlpha(float alphaValue) {
+        mSearchBox.animate().alpha(alphaValue).start();
+    }
+
     /**
      * Saves the current state of the action bar into a provided {@link Bundle}
      */
