Remove relayouts
b/29945805
> Workspace relayout occurs when window flag is set to
change the status bar. This should not cause AllAppsTransitionController
to be initialized.
> Setting/Unsetting background drawables on the hotseat
also causes unnecessary layout. Fix this issue.
Change-Id: I73a3bfd3eb4bc34cf6760ffbd9826e3fef867056
diff --git a/src/com/android/launcher3/Hotseat.java b/src/com/android/launcher3/Hotseat.java
index b2f24be..b75d2c0 100644
--- a/src/com/android/launcher3/Hotseat.java
+++ b/src/com/android/launcher3/Hotseat.java
@@ -220,11 +220,10 @@
}
public void setBackgroundTransparent(boolean enable) {
- // This causes re-layout. Should replace the logic with simply setting the background alpha
if (enable) {
- setBackground(null);
+ mBackground.setAlpha(0);
} else {
- setBackground(mBackground);
+ mBackground.setAlpha(255);
}
}
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 3ae8cd8..87236aa 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -444,5 +444,6 @@
if (!mLauncher.isAllAppsVisible()) {
setProgress(mShiftRange);
}
+ mHotseat.removeOnLayoutChangeListener(this);
}
}