diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index 691228d..eac3c47 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -166,7 +166,8 @@
  * The Apps/Customize page that displays all the applications, widgets, and shortcuts.
  */
 public class AppsCustomizePagedView extends PagedViewWithDraggableItems implements
-        AllAppsView, View.OnClickListener, View.OnKeyListener, DragSource {
+        AllAppsView, View.OnClickListener, View.OnKeyListener, DragSource,
+        PagedViewIcon.PressedCallback {
     static final String LOG_TAG = "AppsCustomizePagedView";
 
     /**
@@ -185,6 +186,7 @@
 
     // Save and Restore
     private int mSaveInstanceStateItemIndex = -1;
+    private PagedViewIcon mPressedIcon;
 
     // Content
     private ArrayList<ApplicationInfo> mApps;
@@ -593,6 +595,9 @@
 
         if (!super.beginDragging(v)) return false;
 
+        // Reset the alpha on the dragged icon before we drag
+        resetDrawableState();
+
         // Go into spring loaded mode (must happen before we startDrag())
         mLauncher.enterSpringLoadedDragMode();
 
@@ -751,7 +756,7 @@
             ApplicationInfo info = mApps.get(i);
             PagedViewIcon icon = (PagedViewIcon) mLayoutInflater.inflate(
                     R.layout.apps_customize_application, layout, false);
-            icon.applyFromApplicationInfo(info, true);
+            icon.applyFromApplicationInfo(info, true, this);
             icon.setOnClickListener(this);
             icon.setOnLongClickListener(this);
             icon.setOnTouchListener(this);
@@ -1427,6 +1432,22 @@
         cancelAllTasks();
     }
 
+    @Override
+    public void iconPressed(PagedViewIcon icon) {
+        // Reset the previously pressed icon and store a reference to the pressed icon so that
+        // we can reset it on return to Launcher (in Launcher.onResume())
+        if (mPressedIcon != null) {
+            mPressedIcon.resetDrawableState();
+        }
+        mPressedIcon = icon;
+    }
+
+    public void resetDrawableState() {
+        if (mPressedIcon != null) {
+            mPressedIcon.resetDrawableState();
+            mPressedIcon = null;
+        }
+    }
 
     /*
      * We load an extra page on each side to prevent flashes from scrolling and loading of the
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 2b91302..6ac9fe2 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -561,9 +561,17 @@
             mRestoring = false;
             mOnResumeNeedsLoad = false;
         }
+
+        // Reset the pressed state of icons that were locked in the press state while activities
+        // were launching
         if (mWaitingForResume != null) {
+            // Resets the previous workspace icon press state
             mWaitingForResume.setStayPressed(false);
         }
+        if (mAppsCustomizeContent != null) {
+            // Resets the previous all apps icon press state
+            mAppsCustomizeContent.resetDrawableState();
+        }
         // When we resume Launcher, a different Activity might be responsible for the app
         // market intent, so refresh the icon
         updateAppMarketIcon();
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index 548b394..00f9321 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -26,7 +26,16 @@
  * drawables on the top).
  */
 public class PagedViewIcon extends TextView {
+    /** A simple callback interface to allow a PagedViewIcon to notify when it has been pressed */
+    public static interface PressedCallback {
+        void iconPressed(PagedViewIcon icon);
+    }
+
     private static final String TAG = "PagedViewIcon";
+    private static final float PRESS_ALPHA = 0.4f;
+
+    private PagedViewIcon.PressedCallback mPressedCallback;
+    private boolean mResetDrawableState = false;
 
     private Bitmap mIcon;
 
@@ -42,15 +51,38 @@
         super(context, attrs, defStyle);
     }
 
-    public void applyFromApplicationInfo(ApplicationInfo info, boolean scaleUp) {
+    public void applyFromApplicationInfo(ApplicationInfo info, boolean scaleUp,
+            PagedViewIcon.PressedCallback cb) {
         mIcon = info.iconBitmap;
+        mPressedCallback = cb;
         setCompoundDrawablesWithIntrinsicBounds(null, new FastBitmapDrawable(mIcon), null, null);
         setText(info.title);
         setTag(info);
     }
 
+    public void resetDrawableState() {
+        mResetDrawableState = true;
+        post(new Runnable() {
+            @Override
+            public void run() {
+                refreshDrawableState();
+            }
+        });
+    }
+
     protected void drawableStateChanged() {
-        setAlpha(isPressed() ? 0.5f : 1f);
         super.drawableStateChanged();
+
+        // We keep in the pressed state until resetDrawableState() is called to reset the press
+        // feedback
+        if (isPressed()) {
+            setAlpha(PRESS_ALPHA);
+            if (mPressedCallback != null) {
+                mPressedCallback.iconPressed(this);
+            }
+        } else if (mResetDrawableState) {
+            setAlpha(1f);
+            mResetDrawableState = false;
+        }
     }
 }
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index 4ecc1a5..ab78a8c 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -231,7 +231,7 @@
     private float[] mNewBackgroundAlphaMultipliers;
     private float[] mNewAlphas;
     private float[] mNewRotationYs;
-    private float mTransitionProgress;
+    private float mTransitionProgress = 1f;
 
     /**
      * Used to inflate the Workspace from XML.
