Fixing some issues/regressions related to scaled icons.

- Fixes issue with folder icons being clipped in landscape in sw720dp (Bug: 6118397)
- Fixes issue with divider being in wrong orientation in sw720dp
- Fixes issue with scaled icons not being drawn with filtering
- Fixes issue with side pages showing under the hotseat when in landscape in phone UI
- Animates the drag view on pick up and drop

Change-Id: Iad26427ec63fcbc9bdb3b29a4645689ba445d5c8
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index e64b0c3..0854508 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -580,7 +580,14 @@
 
             // Calculate the variable page spacing if necessary
             if (mPageSpacing < 0) {
-                setPageSpacing(((right - left) - getChildAt(0).getMeasuredWidth()) / 2);
+                // The gap between pages in the PagedView should be equal to the gap from the page
+                // to the edge of the screen (so it is not visible in the current screen).  To
+                // account for unequal padding on each side of the paged view, we take the maximum
+                // of the left/right gap and use that as the gap between each page.
+                int offset = getRelativeChildOffset(0);
+                int spacing = Math.max(offset, (right - left) - offset -
+                        getChildAt(0).getMeasuredWidth());
+                setPageSpacing(spacing);
             }
         }