diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java index 72ad69bcc8..320d2878d4 100644 --- a/src/com/android/launcher3/allapps/AllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java @@ -543,6 +543,9 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource, } 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 45ef6c1bb2..ea91770aaf 100644 --- a/src/com/android/launcher3/allapps/PredictionRowView.java +++ b/src/com/android/launcher3/allapps/PredictionRowView.java @@ -68,7 +68,10 @@ public class PredictionRowView extends LinearLayout { * Sets the number of apps per row. */ public void setNumAppsPerRow(int numPredictedAppsPerRow) { - mNumPredictedAppsPerRow = numPredictedAppsPerRow; + if (mNumPredictedAppsPerRow != numPredictedAppsPerRow) { + mNumPredictedAppsPerRow = numPredictedAppsPerRow; + onAppsUpdated(); + } } /**