Don't show the outline on the current page

- only on sw720dp+ devices

Change-Id: I7253bedbf6dd61c766fe7e9ad861d3a917d37fed
This commit is contained in:
Michael Jurka
2012-05-08 13:43:43 -07:00
parent bec653ea44
commit a3d30adbfd
2 changed files with 26 additions and 7 deletions
+22 -6
View File
@@ -383,7 +383,7 @@ public class Workspace extends SmoothPagedView
mIsDragOccuring = true;
updateChildrenLayersEnabled();
mLauncher.lockScreenOrientation();
setChildrenBackgroundAlphaMultipliers(1f);
// Prevent any Un/InstallShortcutReceivers from updating the db while we are dragging
InstallShortcutReceiver.enableInstallQueue();
UninstallShortcutReceiver.enableUninstallQueue();
@@ -1194,10 +1194,7 @@ public class Workspace extends SmoothPagedView
return Math.min(r / threshold, 1.0f);
}
@Override
protected void screenScrolled(int screenCenter) {
super.screenScrolled(screenCenter);
private void updatePageAlphaValues(int screenCenter) {
boolean isInOverscroll = mOverScrollX < 0 || mOverScrollX > mMaxScrollX;
if (mWorkspaceFadeInAdjacentScreens &&
mState == State.NORMAL &&
@@ -1209,10 +1206,29 @@ public class Workspace extends SmoothPagedView
float scrollProgress = getScrollProgress(screenCenter, child, i);
float alpha = 1 - Math.abs(scrollProgress);
child.getShortcutsAndWidgets().setAlpha(alpha);
if (!mIsDragOccuring) {
child.setBackgroundAlphaMultiplier(
backgroundAlphaInterpolator(Math.abs(scrollProgress)));
} else {
child.setBackgroundAlphaMultiplier(1f);
}
}
}
invalidate();
}
}
private void setChildrenBackgroundAlphaMultipliers(float a) {
for (int i = 0; i < getChildCount(); i++) {
CellLayout child = (CellLayout) getChildAt(i);
child.setBackgroundAlphaMultiplier(a);
}
}
@Override
protected void screenScrolled(int screenCenter) {
super.screenScrolled(screenCenter);
updatePageAlphaValues(screenCenter);
if (mOverScrollX < 0 || mOverScrollX > mMaxScrollX) {
int index = mOverScrollX < 0 ? 0 : getChildCount() - 1;