mBackgroundAlphaMultiplier = multiplier;
}
+ public float getBackgroundAlphaMultiplier() {
+ return mBackgroundAlphaMultiplier;
+ }
+
public void setBackgroundAlpha(float alpha) {
mBackgroundAlpha = alpha;
invalidate();
int delta = screenCenter - (getChildOffset(i) -
getRelativeChildOffset(i) + halfScreenSize);
- float scrollProgress = delta/(totalDistance*1.0f);
+ float scrollProgress = delta / (totalDistance * 1.0f);
scrollProgress = Math.min(scrollProgress, 1.0f);
scrollProgress = Math.max(scrollProgress, -1.0f);
- float mult = mInDragMode ? 1.0f : Math.abs(scrollProgress);
- cl.setBackgroundAlphaMultiplier(mult);
+ cl.setBackgroundAlphaMultiplier(Math.abs(scrollProgress));
float rotation = WORKSPACE_ROTATION * scrollProgress;
cl.setRotationY(rotation);
mActivePointerId = INVALID_POINTER;
CellLayout currentPage = (CellLayout) getChildAt(mCurrentPage);
+ if (currentPage.getBackgroundAlphaMultiplier() < 1.0f) {
+ currentPage.setBackgroundAlpha(0.0f);
+ }
currentPage.setBackgroundAlphaMultiplier(1.0f);
final Resources res = getResources();
mDragTargetLayout.onDragEnter();
showOutlines();
mInDragMode = true;
- CellLayout cl = (CellLayout) getChildAt(mCurrentPage);
- cl.setBackgroundAlphaMultiplier(1.0f);
}
}