Merge "Changing texture coord from vec4 to vec2"
diff --git a/res/layout-xlarge/launcher.xml b/res/layout-xlarge/launcher.xml
index 2b43442..65f29df 100644
--- a/res/layout-xlarge/launcher.xml
+++ b/res/layout-xlarge/launcher.xml
@@ -37,7 +37,8 @@
         android:paddingTop="?android:attr/actionBarSize"
         launcher:defaultScreen="2"
         launcher:cellCountX="8"
-        launcher:cellCountY="7">
+        launcher:cellCountY="7"
+        launcher:pageSpacing="64dip">
 
         <include android:id="@+id/cell1" layout="@layout/workspace_screen" />
         <include android:id="@+id/cell2" layout="@layout/workspace_screen" />
diff --git a/res/values-xlarge/config.xml b/res/values-xlarge/config.xml
index c7c68e2..73e7146 100644
--- a/res/values-xlarge/config.xml
+++ b/res/values-xlarge/config.xml
@@ -27,8 +27,6 @@
     <integer name="config_toolbarButtonFadeInTime">350</integer>
     <integer name="config_toolbarButtonFadeOutTime">350</integer>
 
-    <integer name="config_crosshairsFadeInTime">600</integer>
-
     <!-- When dragging items on the workspace, how much bigger (in pixels) the dragged view
          should be, as compared to the original view. If 0, it will not be scaled at all.
          Should be an even number, for pixel alignment. -->
@@ -38,11 +36,4 @@
          the drag view should be offset from the position of the original view. -->
     <integer name="config_dragViewOffsetX">0</integer>
     <integer name="config_dragViewOffsetY">12</integer>
-
-    <!-- The duration (in ms) of the fade animation on the object outlines, used when
-         we are dragging objects around on the home screen. -->
-    <integer name="config_dragOutlineFadeTime">900</integer>
-
-    <!-- The alpha value at which to show the most recent drop visualization outline. -->
-    <integer name="config_dragOutlineMaxAlpha">180</integer>
 </resources>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 3e2a8e9..14a5e98 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -89,6 +89,8 @@
         <attr name="pageLayoutPaddingBottom" format="dimension" />
         <attr name="pageLayoutPaddingLeft" format="dimension" />
         <attr name="pageLayoutPaddingRight" format="dimension" />
+        <!-- The space between adjacent pages of the PagedView. -->
+        <attr name="pageSpacing" format="dimension" />
     </declare-styleable>
 
     <!-- CustomizePagedView specific attributes. These attributes are used to customize
diff --git a/res/values/config.xml b/res/values/config.xml
index db967ea..b6d5037 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -5,6 +5,8 @@
     <integer name="config_allAppsBatchSize">0</integer>
     <bool name="config_hardwareAccelerated">false</bool>
 
+    <integer name="config_crosshairsFadeInTime">600</integer>
+
     <!--  When dragging an item on the workspace, how much bigger (in pixels) the dragged view
           should be, as compared to the original view. If 0, it will not be scaled at all.
           Should be an even number, for pixel alignment. -->
@@ -15,4 +17,11 @@
          Setting to 1/2 of config_dragViewExtraPixels keeps it centered on its old position. -->
     <integer name="config_dragViewOffsetX">20</integer>
     <integer name="config_dragViewOffsetY">20</integer>
+
+    <!-- The duration (in ms) of the fade animation on the object outlines, used when
+         we are dragging objects around on the home screen. -->
+    <integer name="config_dragOutlineFadeTime">900</integer>
+
+    <!-- The alpha value at which to show the most recent drop visualization outline. -->
+    <integer name="config_dragOutlineMaxAlpha">180</integer>
 </resources>
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index 3fb1679..b392959 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -66,13 +66,6 @@
     static final int ALL_APPS_FLAG = -1;
     private int mAppFilter = ALL_APPS_FLAG;
 
-    private int mCellCountX;
-    private int mCellCountY;
-    private int mPageLayoutPaddingTop;
-    private int mPageLayoutPaddingBottom;
-    private int mPageLayoutPaddingLeft;
-    private int mPageLayoutPaddingRight;
-
     private final LayoutInflater mInflater;
 
     private ViewGroup mOrigInfoButtonParent;
@@ -94,14 +87,6 @@
         TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.PagedView, defStyle, 0);
         mCellCountX = a.getInt(R.styleable.PagedView_cellCountX, 6);
         mCellCountY = a.getInt(R.styleable.PagedView_cellCountY, 4);
-        mPageLayoutPaddingTop = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingTop, 10);
-        mPageLayoutPaddingBottom = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingBottom, 10);
-        mPageLayoutPaddingLeft = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingLeft, 10);
-        mPageLayoutPaddingRight = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingRight, 10);
         mInflater = LayoutInflater.from(context);
         a.recycle();
         setSoundEffectsEnabled(false);
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index 0f1d469..3f9945f 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -145,57 +145,57 @@
 
         mWallpaperManager = WallpaperManager.getInstance(context);
 
-        if (LauncherApplication.isScreenXLarge()) {
-            final Resources res = getResources();
+        final Resources res = getResources();
 
+        if (LauncherApplication.isScreenXLarge()) {
             mBackgroundMini = res.getDrawable(R.drawable.mini_home_screen_bg);
             mBackgroundMini.setFilterBitmap(true);
             mBackground = res.getDrawable(R.drawable.home_screen_bg);
             mBackground.setFilterBitmap(true);
             mBackgroundMiniHover = res.getDrawable(R.drawable.mini_home_screen_bg_hover);
             mBackgroundMiniHover.setFilterBitmap(true);
+        }
 
-            // Initialize the data structures used for the drag visualization.
+        // Initialize the data structures used for the drag visualization.
 
-            mDragRectDrawable = res.getDrawable(R.drawable.rounded_rect_green);
-            mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
-            Interpolator interp = new DecelerateInterpolator(2.5f); // Quint ease out
+        mDragRectDrawable = res.getDrawable(R.drawable.rounded_rect_green);
+        mCrosshairsDrawable = res.getDrawable(R.drawable.gardening_crosshairs);
+        Interpolator interp = new DecelerateInterpolator(2.5f); // Quint ease out
 
-            // Set up the animation for fading the crosshairs in and out
-            int animDuration = res.getInteger(R.integer.config_crosshairsFadeInTime);
-            mCrosshairsAnimator = new ValueAnimator<Float>(animDuration);
-            mCrosshairsAnimator.addUpdateListener(new AnimatorUpdateListener() {
+        // Set up the animation for fading the crosshairs in and out
+        int animDuration = res.getInteger(R.integer.config_crosshairsFadeInTime);
+        mCrosshairsAnimator = new ValueAnimator<Float>(animDuration);
+        mCrosshairsAnimator.addUpdateListener(new AnimatorUpdateListener() {
+            public void onAnimationUpdate(ValueAnimator animation) {
+                mCrosshairsVisibility = ((Float) animation.getAnimatedValue()).floatValue();
+                CellLayout.this.invalidate();
+            }
+        });
+        mCrosshairsAnimator.setInterpolator(interp);
+
+        for (int i = 0; i < mDragRects.length; i++) {
+            mDragRects[i] = new Rect();
+        }
+
+        // When dragging things around the home screens, we show a green outline of
+        // where the item will land. The outlines gradually fade out, leaving a trail
+        // behind the drag path.
+        // Set up all the animations that are used to implement this fading.
+        final int duration = res.getInteger(R.integer.config_dragOutlineFadeTime);
+        final int fromAlphaValue = 0;
+        final int toAlphaValue = res.getInteger(R.integer.config_dragOutlineMaxAlpha);
+        for (int i = 0; i < mDragRectAnims.length; i++) {
+            final InterruptibleInOutAnimator anim =
+                new InterruptibleInOutAnimator(duration, fromAlphaValue, toAlphaValue);
+            anim.setInterpolator(interp);
+            final int thisIndex = i;
+            anim.addUpdateListener(new AnimatorUpdateListener() {
                 public void onAnimationUpdate(ValueAnimator animation) {
-                    mCrosshairsVisibility = ((Float) animation.getAnimatedValue()).floatValue();
-                    CellLayout.this.invalidate();
+                    mDragRectAlphas[thisIndex] = (Integer) animation.getAnimatedValue();
+                    CellLayout.this.invalidate(mDragRects[thisIndex]);
                 }
             });
-            mCrosshairsAnimator.setInterpolator(interp);
-
-            for (int i = 0; i < mDragRects.length; i++) {
-                mDragRects[i] = new Rect();
-            }
-
-            // When dragging things around the home screens, we show a green outline of
-            // where the item will land. The outlines gradually fade out, leaving a trail
-            // behind the drag path.
-            // Set up all the animations that are used to implement this fading.
-            final int duration = res.getInteger(R.integer.config_dragOutlineFadeTime);
-            final int fromAlphaValue = 0;
-            final int toAlphaValue = res.getInteger(R.integer.config_dragOutlineMaxAlpha);
-            for (int i = 0; i < mDragRectAnims.length; i++) {
-                final InterruptibleInOutAnimator anim =
-                    new InterruptibleInOutAnimator(duration, fromAlphaValue, toAlphaValue);
-                anim.setInterpolator(interp);
-                final int thisIndex = i;
-                anim.addUpdateListener(new AnimatorUpdateListener() {
-                    public void onAnimationUpdate(ValueAnimator animation) {
-                        mDragRectAlphas[thisIndex] = (Integer) animation.getAnimatedValue();
-                        CellLayout.this.invalidate(mDragRects[thisIndex]);
-                    }
-                });
-                mDragRectAnims[i] = anim;
-            }
+            mDragRectAnims[i] = anim;
         }
     }
 
@@ -226,8 +226,10 @@
             } else {
                 bg = mBackground;
             }
-            bg.setAlpha((int) (mBackgroundAlpha * 255));
-            bg.draw(canvas);
+            if (bg != null) {
+                bg.setAlpha((int) (mBackgroundAlpha * 255));
+                bg.draw(canvas);
+            }
         }
         super.dispatchDraw(canvas);
     }
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 62e5496..b7e5dcd 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -115,12 +115,6 @@
     private List<ResolveInfo> mWallpaperList;
     private List<ApplicationInfo> mApps;
 
-    private int mCellCountX;
-    private int mCellCountY;
-    private int mPageLayoutPaddingTop;
-    private int mPageLayoutPaddingBottom;
-    private int mPageLayoutPaddingLeft;
-    private int mPageLayoutPaddingRight;
     private static final int sMinWidgetCellHSpan = 2;
     private static final int sMaxWidgetCellHSpan = 4;
 
@@ -151,14 +145,7 @@
         a = context.obtainStyledAttributes(attrs, R.styleable.PagedView, defStyle, 0);
         mCellCountX = a.getInt(R.styleable.PagedView_cellCountX, 7);
         mCellCountY = a.getInt(R.styleable.PagedView_cellCountY, 4);
-        mPageLayoutPaddingTop = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingTop, 10);
-        mPageLayoutPaddingBottom = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingBottom, 10);
-        mPageLayoutPaddingLeft = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingLeft, 10);
-        mPageLayoutPaddingRight = a.getDimensionPixelSize(
-                R.styleable.PagedView_pageLayoutPaddingRight, 10);
+
         a.recycle();
         mCustomizationType = CustomizationType.WidgetCustomization;
         mWidgetPages = new ArrayList<ArrayList<AppWidgetProviderInfo>>();
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index ad37779..bdaa43d 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -239,7 +239,6 @@
     private CharSequence[] mHotseatLabels = null;
 
     private Intent mAppMarketIntent = null;
-    private Intent mGlobalSearchIntent = null;
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
@@ -1757,13 +1756,7 @@
      * @param v The view that was clicked.
      */
     public void onClickSearchButton(View v) {
-        if (mGlobalSearchIntent != null) {
-            View b = findViewById(R.id.search_button);
-            mGlobalSearchIntent.setSourceBounds(
-                    new Rect(b.getLeft(), b.getTop(), b.getRight(), b.getBottom()));
-            startActivitySafely(mGlobalSearchIntent, "global search");
-        }
-
+        startSearch(null, false, null, true);
     }
 
     /**
@@ -1945,12 +1938,7 @@
                 mWorkspace.setAllowLongPress(false);
                 mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
                         HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
-                if (LauncherApplication.isScreenXLarge()) {
-                    // Animate the widget chooser up from the bottom of the screen
-                    if (!isCustomizationDrawerVisible()) {
-                        showCustomizationDrawer(true);
-                    }
-                } else {
+                if (!LauncherApplication.isScreenXLarge()) {
                     showAddDialog(longClickCellInfo.cellX, longClickCellInfo.cellY);
                 }
             } else {
@@ -2673,56 +2661,60 @@
         }
     }
 
-    /* Core logic for updating market and search button icons. Intent is used to resolve which
-     * activity to ask for an icon. Returns intent to launch the activity, or null if it wasn't
-     * resolved */
-    private Intent updateExternalIcon(int buttonId, Intent intent, int fallbackDrawableId) {
-        if (LauncherApplication.isScreenXLarge()) {
-            // Find the app market activity by resolving an intent.
-            // (If multiple app markets are installed, it will return the ResolverActivity.)
+    private void updateButtonWithIconFromExternalActivity(
+            int buttonId, ComponentName activityName, int fallbackDrawableId) {
+        ImageView button = (ImageView) findViewById(buttonId);
+        Drawable toolbarIcon = null;
+        try {
             PackageManager packageManager = getPackageManager();
-            ComponentName activityName = intent.resolveActivity(getPackageManager());
+            // Look for the toolbar icon specified in the activity meta-data
+            Bundle metaData = packageManager.getActivityInfo(
+                    activityName, PackageManager.GET_META_DATA).metaData;
+            if (metaData != null) {
+                int iconResId = metaData.getInt(TOOLBAR_ICON_METADATA_NAME);
+                if (iconResId != 0) {
+                    Resources res = packageManager.getResourcesForActivity(activityName);
+                    toolbarIcon = res.getDrawable(iconResId);
+                }
+            }
+        } catch (NameNotFoundException e) {
+            // Do nothing
+        }
+        // If we were unable to find the icon via the meta-data, use a generic one
+        if (toolbarIcon == null) {
+            button.setImageResource(fallbackDrawableId);
+        } else {
+            button.setImageDrawable(toolbarIcon);
+        }
+    }
+
+    private void updateGlobalSearchIcon() {
+        if (LauncherApplication.isScreenXLarge()) {
+            final SearchManager searchManager =
+                    (SearchManager) getSystemService(Context.SEARCH_SERVICE);
+            ComponentName activityName = searchManager.getGlobalSearchActivity();
             if (activityName != null) {
-                ImageView button = (ImageView) findViewById(buttonId);
-                Drawable toolbarIcon = null;
-                try {
-                    // Look for the toolbar icon specified in the activity meta-data
-                    Bundle metaData = packageManager.getActivityInfo(
-                            activityName, PackageManager.GET_META_DATA).metaData;
-                    if (metaData != null) {
-                        int iconResId = metaData.getInt(TOOLBAR_ICON_METADATA_NAME);
-                        if (iconResId != 0) {
-                            Resources res = packageManager.getResourcesForActivity(activityName);
-                            toolbarIcon = res.getDrawable(iconResId);
-                        }
-                    }
-                } catch (NameNotFoundException e) {
-                    // Do nothing
-                }
-                // If we were unable to find the icon via the meta-data, use a generic one
-                if (toolbarIcon == null) {
-                    button.setImageResource(fallbackDrawableId);
-                } else {
-                    button.setImageDrawable(toolbarIcon);
-                }
-                return intent;
+                updateButtonWithIconFromExternalActivity(
+                        R.id.search_button, activityName, R.drawable.search_button_generic);
             }
         }
-        return null;
     }
+
     /**
      * Sets the app market icon (shown when all apps is visible on x-large screens)
      */
     private void updateAppMarketIcon() {
-        Intent intent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_APP_MARKET);
-        mAppMarketIntent = updateExternalIcon(
-                R.id.market_button, intent, R.drawable.app_market_generic);
-    }
-
-    private void updateGlobalSearchIcon() {
-        Intent intent = new Intent(SearchManager.INTENT_ACTION_GLOBAL_SEARCH);
-        mGlobalSearchIntent = updateExternalIcon(
-                R.id.search_button, intent, R.drawable.search_button_generic);
+        if (LauncherApplication.isScreenXLarge()) {
+            Intent intent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_APP_MARKET);
+            // Find the app market activity by resolving an intent.
+            // (If multiple app markets are installed, it will return the ResolverActivity.)
+            ComponentName activityName = intent.resolveActivity(getPackageManager());
+            if (activityName != null) {
+                mAppMarketIntent = intent;
+                updateButtonWithIconFromExternalActivity(
+                        R.id.market_button, activityName, R.drawable.app_market_generic);
+            }
+        }
     }
 
     /**
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index a1b1e08..732bfbd 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -20,6 +20,7 @@
 import java.util.HashMap;
 
 import android.content.Context;
+import android.content.res.TypedArray;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
 import android.graphics.Rect;
@@ -90,6 +91,13 @@
     private int mTouchSlop;
     private int mPagingTouchSlop;
     private int mMaximumVelocity;
+    protected int mPageSpacing;
+    protected int mPageLayoutPaddingTop;
+    protected int mPageLayoutPaddingBottom;
+    protected int mPageLayoutPaddingLeft;
+    protected int mPageLayoutPaddingRight;
+    protected int mCellCountX;
+    protected int mCellCountY;
 
     protected static final int INVALID_POINTER = -1;
 
@@ -168,6 +176,19 @@
         super(context, attrs, defStyle);
         mChoiceMode = CHOICE_MODE_NONE;
 
+        TypedArray a = context.obtainStyledAttributes(attrs,
+                R.styleable.PagedView, defStyle, 0);
+        mPageSpacing = a.getDimensionPixelSize(R.styleable.PagedView_pageSpacing, 0);
+        mPageLayoutPaddingTop = a.getDimensionPixelSize(
+                R.styleable.PagedView_pageLayoutPaddingTop, 10);
+        mPageLayoutPaddingBottom = a.getDimensionPixelSize(
+                R.styleable.PagedView_pageLayoutPaddingBottom, 10);
+        mPageLayoutPaddingLeft = a.getDimensionPixelSize(
+                R.styleable.PagedView_pageLayoutPaddingLeft, 10);
+        mPageLayoutPaddingRight = a.getDimensionPixelSize(
+                R.styleable.PagedView_pageLayoutPaddingRight, 10);
+        a.recycle();
+
         setHapticFeedbackEnabled(false);
         init();
     }
@@ -359,7 +380,7 @@
                 final int childHeight = (getMeasuredHeight() - child.getMeasuredHeight()) / 2;
                 child.layout(childLeft, childHeight,
                         childLeft + childWidth, childHeight + child.getMeasuredHeight());
-                childLeft += childWidth;
+                childLeft += childWidth + mPageSpacing;
             }
         }
     }
@@ -387,6 +408,7 @@
                             d += getChildAt(i + 1).getMeasuredWidth() / 2;
                         }
                     }
+                    d += mPageSpacing;
 
                     float dimAlpha = (float) (Math.abs(distanceFromScreenCenter)) / d;
                     dimAlpha = Math.max(0.0f, Math.min(1.0f, (dimAlpha * dimAlpha)));
@@ -433,7 +455,7 @@
             int rightScreen = 0;
             while (x <= mScrollX) {
                 leftScreen++;
-                x += pageWidth;
+                x += pageWidth + mPageSpacing;
                 // replace above line with this if you don't assume all pages have same width as 0th
                 // page:
                 // x += getChildAt(leftScreen).getMeasuredWidth();
@@ -441,7 +463,7 @@
             rightScreen = leftScreen;
             while (x < mScrollX + screenWidth) {
                 rightScreen++;
-                x += pageWidth;
+                x += pageWidth + mPageSpacing;
                 // replace above line with this if you don't assume all pages have same width as 0th
                 // page:
                 //if (rightScreen < pageCount) {
@@ -874,13 +896,14 @@
 
     protected int getChildIndexForRelativeOffset(int relativeOffset) {
         final int childCount = getChildCount();
-        int left = getRelativeChildOffset(0);
+        int left;
+        int right;
         for (int i = 0; i < childCount; ++i) {
-            final int right = (left + getChildAt(i).getMeasuredWidth());
+            left = getRelativeChildOffset(i);
+            right = (left + getChildAt(i).getMeasuredWidth());
             if (left <= relativeOffset && relativeOffset <= right) {
                 return i;
             }
-            left = right;
         }
         return -1;
     }
@@ -895,7 +918,7 @@
 
         int offset = getRelativeChildOffset(0);
         for (int i = 0; i < index; ++i) {
-            offset += getChildAt(i).getMeasuredWidth();
+            offset += getChildAt(i).getMeasuredWidth() + mPageSpacing;
         }
         return offset;
     }
diff --git a/src/com/android/launcher2/Workspace.java b/src/com/android/launcher2/Workspace.java
index eeb496d..47e172f 100644
--- a/src/com/android/launcher2/Workspace.java
+++ b/src/com/android/launcher2/Workspace.java
@@ -475,9 +475,9 @@
 
     @Override
     protected void screenScrolled(int screenCenter) {
-        View cur = getChildAt(mCurrentPage);
-        View toRight = getChildAt(mCurrentPage + 1);
-        View toLeft = getChildAt(mCurrentPage - 1);
+        CellLayout cur = (CellLayout) getChildAt(mCurrentPage);
+        CellLayout toRight = (CellLayout) getChildAt(mCurrentPage + 1);
+        CellLayout toLeft = (CellLayout) getChildAt(mCurrentPage - 1);
 
         for (int i = 0; i < mCurrentPage - 1; i++) {
             View v = getChildAt(i);
@@ -494,11 +494,12 @@
             }
         }
 
+        int halfScreenSize = getMeasuredWidth() / 2;
         int pageWidth = cur.getMeasuredWidth();
-        int delta = screenCenter - (mCurrentPage * pageWidth + pageWidth / 2 +
-                getRelativeChildOffset(0));
+        int delta = screenCenter - (getChildOffset(mCurrentPage) -
+                getRelativeChildOffset(mCurrentPage) + halfScreenSize);
 
-        float scrollProgress = Math.abs(delta/(pageWidth*1.0f));
+        float scrollProgress = Math.abs(delta/(pageWidth*1.0f + mPageSpacing));
         int scrollDirection = delta > 0 ? SCROLL_LEFT : SCROLL_RIGHT;
 
         float rotation;
@@ -507,6 +508,7 @@
             rotation = -scrollProgress * WORKSPACE_ROTATION;
             cur.setRotationY(rotation);
             cur.setScaleX(getScaleXForRotation(rotation));
+
             if (toLeft != null) {
                 rotation = WORKSPACE_ROTATION * (1 - scrollProgress);
                 toLeft.setRotationY(rotation);