Preventing drawing pages in Workspace if possible

Bug: 6427601

Change-Id: I259554557a5856aa17a532c656032c4d6d5826bd
This commit is contained in:
Michael Jurka
2012-05-14 16:29:55 -07:00
parent a5a771ca1f
commit 920d7f433e
2 changed files with 12 additions and 1 deletions
+7
View File
@@ -450,6 +450,13 @@ public class Workspace extends SmoothPagedView
public void onChildViewRemoved(View parent, View child) {
}
protected boolean shouldDrawChild(View child) {
final CellLayout cl = (CellLayout) child;
return super.shouldDrawChild(child) &&
(cl.getShortcutsAndWidgets().getAlpha() > 0 ||
cl.getBackgroundAlpha() > 0);
}
/**
* @return The open folder on the current screen, or null if there is none
*/