summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/AllAppsPagedView.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher2/AllAppsPagedView.java')
-rw-r--r--src/com/android/launcher2/AllAppsPagedView.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index d9a503fbe..c812a4698 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -517,6 +517,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
if (!mFilteredApps.isEmpty()) {
int curNumPageItems = layout.getPageChildCount();
int numPageItems = endIndex - startIndex;
+ boolean createHolographicOutlines = (numPages > 1);
// If we were previously an empty page, then restart anew
boolean wasEmptyPage = false;
@@ -541,7 +542,6 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
// Add any necessary items
for (int i = curNumPageItems; i < numPageItems; ++i) {
- final boolean createHolographicOutlines = (numPages > 1);
TextView text = (TextView) mInflater.inflate(
R.layout.all_apps_paged_view_application, layout, false);
text.setOnClickListener(this);
@@ -549,14 +549,13 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
text.setOnTouchListener(this);
layout.addViewToCellLayout(text, -1, i,
- new PagedViewCellLayout.LayoutParams(0, 0, 1, 1), createHolographicOutlines);
+ new PagedViewCellLayout.LayoutParams(0, 0, 1, 1));
}
// Actually reapply to the existing text views
for (int i = startIndex; i < endIndex; ++i) {
final int index = i - startIndex;
final ApplicationInfo info = mFilteredApps.get(i);
- final boolean createHolographicOutlines = (numPages > 1);
PagedViewIcon icon = (PagedViewIcon) layout.getChildOnPageAt(index);
icon.applyFromApplicationInfo(
info, mPageViewIconCache, true, createHolographicOutlines);
@@ -567,6 +566,9 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
params.cellY = index / mCellCountX;
}
+ // We should try and sync all the holographic icons after adding/removing new items
+ layout.reloadHolographicIcons(createHolographicOutlines);
+
// Default to left-aligned icons
layout.enableCenteredContent(false);
} else {
@@ -585,7 +587,7 @@ public class AllAppsPagedView extends PagedViewWithDraggableItems implements All
layout.enableCenteredContent(true);
layout.removeAllViewsOnPage();
layout.addViewToCellLayout(icon, -1, 0,
- new PagedViewCellLayout.LayoutParams(0, 0, 4, 1), createHolographicOutlines);
+ new PagedViewCellLayout.LayoutParams(0, 0, 4, 1));
}
layout.createHardwareLayers();
}