commit | 44607301e2afc687330b1b4e4d73c5028dcd4eee | [log] [tgz] |
---|---|---|
author | Mario Bertschler <bmario@google.com> | Tue Nov 28 13:34:20 2017 -0800 |
committer | Mario Bertschler <bmario@google.com> | Tue Nov 28 13:36:03 2017 -0800 |
tree | 740439fc5d89b263945c02e24dd668f767272377 | |
parent | 0c2d9b0f3e65fefc74520479d963613055ef6ccf [diff] |
Fixes a bug when using the prediction row view and changing screen orientation. Bug: 68713881 Change-Id: I9740eee8425d42af87c8c788aefff9a99ae48d2f
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 2bb95cb..eb4c9b2 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -543,6 +543,9 @@ } private void setupHeader() { + if (mFloatingHeaderHandler == null) { + return; + } mHeader.setVisibility(View.VISIBLE); int contentHeight = mLauncher.getDeviceProfile().allAppsCellHeightPx; if (!mUsingTabs) {
diff --git a/src/com/android/launcher3/allapps/PredictionRowView.java b/src/com/android/launcher3/allapps/PredictionRowView.java index 45ef6c1..ea91770 100644 --- a/src/com/android/launcher3/allapps/PredictionRowView.java +++ b/src/com/android/launcher3/allapps/PredictionRowView.java
@@ -68,7 +68,10 @@ * Sets the number of apps per row. */ public void setNumAppsPerRow(int numPredictedAppsPerRow) { - mNumPredictedAppsPerRow = numPredictedAppsPerRow; + if (mNumPredictedAppsPerRow != numPredictedAppsPerRow) { + mNumPredictedAppsPerRow = numPredictedAppsPerRow; + onAppsUpdated(); + } } /**