DO NOT MERGE - the scroll drag area was too small, and should have come from a resource anyway.

Change-Id: If1304e1417cb8ba4dee8657cd619718abba277f0
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 790f835..c83986b 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -37,4 +37,8 @@
     
     <!-- delete_zone_size_full - button_bar_height_portrait -->
     <dimen name="delete_zone_padding">14dip</dimen>
+
+    <!-- the area at the edge of the screen that makes the workspace go left
+         or right while you're dragging. -->
+    <dimen name="scroll_zone">20dp</dimen>
 </resources>
diff --git a/src/com/android/launcher2/DragController.java b/src/com/android/launcher2/DragController.java
index b4f972b..b453061 100644
--- a/src/com/android/launcher2/DragController.java
+++ b/src/com/android/launcher2/DragController.java
@@ -33,6 +33,8 @@
 
 import java.util.ArrayList;
 
+import com.android.launcher.R;
+
 /**
  * Class for initiating a drag within a view or across multiple views.
  */
@@ -47,7 +49,6 @@
     public static int DRAG_ACTION_COPY = 1;
 
     private static final int SCROLL_DELAY = 600;
-    private static final int SCROLL_ZONE = 20;
     private static final int VIBRATE_DURATION = 35;
 
     private static final boolean PROFILE_DRAWING_DURING_DRAG = false;
@@ -87,6 +88,11 @@
     /** Y offset from the upper-left corner of the cell to where we touched.  */
     private float mTouchOffsetY;
 
+    /** the area at the edge of the screen that makes the workspace go left
+     *   or right while you're dragging.
+     */
+    private int mScrollZone;
+
     /** Where the drag originated */
     private DragSource mDragSource;
 
@@ -147,6 +153,7 @@
     public DragController(Context context) {
         mContext = context;
         mHandler = new Handler();
+        mScrollZone = context.getResources().getDimensionPixelSize(R.dimen.scroll_zone);
     }
 
     /**
@@ -378,7 +385,7 @@
             mMotionDownX = screenX;
             mMotionDownY = screenY;
 
-            if ((screenX < SCROLL_ZONE) || (screenX > scrollView.getWidth() - SCROLL_ZONE)) {
+            if ((screenX < mScrollZone) || (screenX > scrollView.getWidth() - mScrollZone)) {
                 mScrollState = SCROLL_WAITING_IN_ZONE;
                 mHandler.postDelayed(mScrollRunnable, SCROLL_DELAY);
             } else {
@@ -419,13 +426,15 @@
             if (mDeleteRegion != null) {
                 inDeleteRegion = mDeleteRegion.contains(screenX, screenY);
             }
-            if (!inDeleteRegion && screenX < SCROLL_ZONE) {
+            //Log.d(Launcher.TAG, "inDeleteRegion=" + inDeleteRegion + " screenX=" + screenX
+            //        + " mScrollZone=" + mScrollZone);
+            if (!inDeleteRegion && screenX < mScrollZone) {
                 if (mScrollState == SCROLL_OUTSIDE_ZONE) {
                     mScrollState = SCROLL_WAITING_IN_ZONE;
                     mScrollRunnable.setDirection(SCROLL_LEFT);
                     mHandler.postDelayed(mScrollRunnable, SCROLL_DELAY);
                 }
-            } else if (!inDeleteRegion && screenX > scrollView.getWidth() - SCROLL_ZONE) {
+            } else if (!inDeleteRegion && screenX > scrollView.getWidth() - mScrollZone) {
                 if (mScrollState == SCROLL_OUTSIDE_ZONE) {
                     mScrollState = SCROLL_WAITING_IN_ZONE;
                     mScrollRunnable.setDirection(SCROLL_RIGHT);