Fixing issue with background being drawn twice in customization tray.
Change-Id: I65995e3cf443d3a1b206ef156af57c7fda4287e0
This commit is contained in:
1 parent
098f9d0cf0
commit
ce93f7ebdb
1 file changed
+6
-3
@@ -780,9 +780,6 @@ public class Workspace extends SmoothPagedView
|
|||||||
// Draw the background gradient if necessary
|
// Draw the background gradient if necessary
|
||||||
if (mBackground != null && mBackgroundAlpha > 0.0f) {
|
if (mBackground != null && mBackgroundAlpha > 0.0f) {
|
||||||
int alpha = (int) (mBackgroundAlpha * 255);
|
int alpha = (int) (mBackgroundAlpha * 255);
|
||||||
mBackground.setAlpha(alpha);
|
|
||||||
mBackground.setBounds(mScrollX, 0, mScrollX + getMeasuredWidth(), getMeasuredHeight());
|
|
||||||
mBackground.draw(canvas);
|
|
||||||
if (mDrawCustomizeTrayBackground) {
|
if (mDrawCustomizeTrayBackground) {
|
||||||
// Find out where to offset the gradient for the customization tray content
|
// Find out where to offset the gradient for the customization tray content
|
||||||
mCustomizationDrawer.getLocationOnScreen(mCustomizationDrawerPos);
|
mCustomizationDrawer.getLocationOnScreen(mCustomizationDrawerPos);
|
||||||
@@ -800,9 +797,15 @@ public class Workspace extends SmoothPagedView
|
|||||||
// Draw the bg gradient
|
// Draw the bg gradient
|
||||||
final int offset = (int) (mCustomizationDrawerPos[1] +
|
final int offset = (int) (mCustomizationDrawerPos[1] +
|
||||||
mCustomizationDrawerTransformedPos[1]);
|
mCustomizationDrawerTransformedPos[1]);
|
||||||
|
mBackground.setAlpha(alpha);
|
||||||
mBackground.setBounds(mScrollX, offset, mScrollX + getMeasuredWidth(),
|
mBackground.setBounds(mScrollX, offset, mScrollX + getMeasuredWidth(),
|
||||||
offset + getMeasuredHeight());
|
offset + getMeasuredHeight());
|
||||||
mBackground.draw(canvas);
|
mBackground.draw(canvas);
|
||||||
|
} else {
|
||||||
|
mBackground.setAlpha(alpha);
|
||||||
|
mBackground.setBounds(mScrollX, 0, mScrollX + getMeasuredWidth(),
|
||||||
|
getMeasuredHeight());
|
||||||
|
mBackground.draw(canvas);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.onDraw(canvas);
|
super.onDraw(canvas);
|
||||||
|
|||||||
Reference in new issue
Block a user