Preventing drawing pages in Workspace if possible
Bug: 6427601 Change-Id: I259554557a5856aa17a532c656032c4d6d5826bd
This commit is contained in:
@@ -747,6 +747,10 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean shouldDrawChild(View child) {
|
||||
return child.getAlpha() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
int halfScreenSize = getMeasuredWidth() / 2;
|
||||
@@ -783,7 +787,7 @@ public abstract class PagedView extends ViewGroup implements ViewGroup.OnHierarc
|
||||
// View.INVISIBLE, preventing re-drawing of their hardware layer
|
||||
for (int i = getChildCount() - 1; i >= 0; i--) {
|
||||
final View v = getPageAt(i);
|
||||
if (leftScreen <= i && i <= rightScreen && v.getAlpha() > 0) {
|
||||
if (leftScreen <= i && i <= rightScreen && shouldDrawChild(v)) {
|
||||
v.setVisibility(VISIBLE);
|
||||
drawChild(canvas, v, drawingTime);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user