Layout tweaks in Launcher

-Removed All apps and Configure toolbar buttons
from Customization Drawer, removed Configure
button from All apps and added Market icon
to All apps
-Changed spacing of CellLayouts when scrolling
-Modified gap spacing in workspace layout
-Made workspace invisible in All apps but touching
the place where the workspace was takes you back
to workspace

Change-Id: I6e2579bfebeb8f1f80fdae07da442f6d399abe33
diff --git a/src/com/android/launcher2/DeleteZone.java b/src/com/android/launcher2/DeleteZone.java
index 4acde1c..be651b2 100644
--- a/src/com/android/launcher2/DeleteZone.java
+++ b/src/com/android/launcher2/DeleteZone.java
@@ -210,56 +210,72 @@
             // In that case, this icon is more tightly spaced next to the delete icon so we want
             // it to have a smaller drag region. When the new drag&drop system comes in, we'll
             // dispatch the drag/drop by calculating what target you're overlapping
-            final int dragPadding = mManageVisibility ? 50 : 10;
-            outRect.top -= dragPadding;
-            outRect.left -= dragPadding;
-            outRect.bottom += dragPadding;
-            outRect.right += dragPadding;
+            final int minPadding = R.dimen.delete_zone_min_padding;
+            final int maxPadding = R.dimen.delete_zone_max_padding;
+            final int outerDragPadding =
+                    getResources().getDimensionPixelSize(R.dimen.delete_zone_size);
+            final int innerDragPadding = getResources().getDimensionPixelSize(
+                    mManageVisibility ? maxPadding : minPadding);
+            outRect.top -= outerDragPadding;
+            outRect.left -= innerDragPadding;
+            outRect.bottom += outerDragPadding;
+            outRect.right += innerDragPadding;
         }
     }
 
     private void createAnimations() {
-        if (mInAnimation == null) {
-            mInAnimation = new FastAnimationSet();
-            final AnimationSet animationSet = mInAnimation;
-            animationSet.setInterpolator(new AccelerateInterpolator());
-            animationSet.addAnimation(new AlphaAnimation(0.0f, 1.0f));
-            if (mOrientation == ORIENTATION_HORIZONTAL) {
-                animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE, 0.0f,
-                        Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f,
-                        Animation.RELATIVE_TO_SELF, 0.0f));
-            } else {
-                animationSet.addAnimation(new TranslateAnimation(Animation.RELATIVE_TO_SELF,
-                        1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.ABSOLUTE, 0.0f,
-                        Animation.ABSOLUTE, 0.0f));
-            }
-            animationSet.setDuration(ANIMATION_DURATION);
-        }
         if (mHandleInAnimation == null) {
             mHandleInAnimation = new AlphaAnimation(0.0f, 1.0f);
             mHandleInAnimation.setDuration(ANIMATION_DURATION);
         }
-        if (mOutAnimation == null) {
-            mOutAnimation = new FastAnimationSet();
-            final AnimationSet animationSet = mOutAnimation;
-            animationSet.setInterpolator(new AccelerateInterpolator());
-            animationSet.addAnimation(new AlphaAnimation(1.0f, 0.0f));
-            if (mOrientation == ORIENTATION_HORIZONTAL) {
-                animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE, 0.0f,
-                        Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
-                        Animation.RELATIVE_TO_SELF, 1.0f));
+
+        if (mInAnimation == null) {
+            mInAnimation = new FastAnimationSet();
+            if (!LauncherApplication.isScreenXLarge()) {
+                final AnimationSet animationSet = mInAnimation;
+                animationSet.setInterpolator(new AccelerateInterpolator());
+                animationSet.addAnimation(new AlphaAnimation(0.0f, 1.0f));
+                if (mOrientation == ORIENTATION_HORIZONTAL) {
+                    animationSet.addAnimation(new TranslateAnimation(Animation.ABSOLUTE, 0.0f,
+                            Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f,
+                            Animation.RELATIVE_TO_SELF, 0.0f));
+                } else {
+                    animationSet.addAnimation(new TranslateAnimation(Animation.RELATIVE_TO_SELF,
+                            1.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.ABSOLUTE, 0.0f,
+                            Animation.ABSOLUTE, 0.0f));
+                }
+                animationSet.setDuration(ANIMATION_DURATION);
             } else {
-                animationSet.addAnimation(new FastTranslateAnimation(Animation.RELATIVE_TO_SELF,
-                        0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.ABSOLUTE, 0.0f,
-                        Animation.ABSOLUTE, 0.0f));
+                mInAnimation.addAnimation(mHandleInAnimation);
             }
-            animationSet.setDuration(ANIMATION_DURATION);
         }
+
         if (mHandleOutAnimation == null) {
             mHandleOutAnimation = new AlphaAnimation(1.0f, 0.0f);
             mHandleOutAnimation.setFillAfter(true);
             mHandleOutAnimation.setDuration(ANIMATION_DURATION);
         }
+
+        if (mOutAnimation == null) {
+            mOutAnimation = new FastAnimationSet();
+            if (!LauncherApplication.isScreenXLarge()) {
+                final AnimationSet animationSet = mOutAnimation;
+                animationSet.setInterpolator(new AccelerateInterpolator());
+                animationSet.addAnimation(new AlphaAnimation(1.0f, 0.0f));
+                if (mOrientation == ORIENTATION_HORIZONTAL) {
+                    animationSet.addAnimation(new FastTranslateAnimation(Animation.ABSOLUTE, 0.0f,
+                            Animation.ABSOLUTE, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f,
+                            Animation.RELATIVE_TO_SELF, 1.0f));
+                } else {
+                    animationSet.addAnimation(new FastTranslateAnimation(Animation.RELATIVE_TO_SELF,
+                            0.0f, Animation.RELATIVE_TO_SELF, 1.0f, Animation.ABSOLUTE, 0.0f,
+                            Animation.ABSOLUTE, 0.0f));
+                }
+                animationSet.setDuration(ANIMATION_DURATION);
+            } else {
+                mOutAnimation.addAnimation(mHandleOutAnimation);
+            }
+        }
     }
 
     void setLauncher(Launcher launcher) {