am ae222ab9: Fixing issue where current page border was showing on drag after adding widget.

* commit 'ae222ab933a8d035394618e3782dd529cf328f08':
  Fixing issue where current page border was showing on drag after adding widget.
This commit is contained in:
Winson Chung
2011-01-10 11:57:58 -08:00
committed by Android Git Automerger
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -488,7 +488,7 @@ public class CellLayout extends ViewGroup implements Dimmable, VisibilityChanged
bg = mini ? mActiveBackgroundMini : mActiveGlowBackground;
} else if (mIsDragOccuring && mAcceptsDrops) {
bg = mini ? mActiveBackgroundMini : mActiveBackground;
} else if (mIsDefaultDropTarget) {
} else if (mIsDragOccuring && mIsDefaultDropTarget) {
bg = mini ? mNormalGlowBackgroundMini : mNormalGlowBackground;
} else {
bg = mini ? mNormalBackgroundMini : mNormalBackground;
+6
View File
@@ -1298,6 +1298,9 @@ public class Workspace extends SmoothPagedView
for (int i = 0; i < screenCount; i++) {
final CellLayout cl = (CellLayout)getChildAt(i);
float finalAlphaValue = (i == mCurrentPage) ? 1.0f : 0.0f;
float finalAlphaMultiplierValue =
((i == mCurrentPage) && (mShrinkState != ShrinkState.SPRING_LOADED)) ?
0.0f : 1.0f;
float rotation = 0.0f;
if (i < mCurrentPage) {
@@ -1315,6 +1318,8 @@ public class Workspace extends SmoothPagedView
PropertyValuesHolder.ofFloat("scaleX", finalScaleFactor),
PropertyValuesHolder.ofFloat("scaleY", finalScaleFactor),
PropertyValuesHolder.ofFloat("backgroundAlpha", finalBackgroundAlpha),
PropertyValuesHolder.ofFloat("backgroundAlphaMultiplier",
finalAlphaMultiplierValue),
PropertyValuesHolder.ofFloat("alpha", finalAlphaValue),
PropertyValuesHolder.ofFloat("rotationY", rotation));
animWithInterpolator.setDuration(duration);
@@ -1326,6 +1331,7 @@ public class Workspace extends SmoothPagedView
cl.setScaleX(finalScaleFactor);
cl.setScaleY(finalScaleFactor);
cl.setBackgroundAlpha(0.0f);
cl.setBackgroundAlphaMultiplier(finalAlphaMultiplierValue);
cl.setAlpha(finalAlphaValue);
cl.setRotationY(rotation);
mUnshrinkAnimationListener.onAnimationEnd(null);