summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/FolderPagedView.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-03-11 16:56:52 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-03-17 15:05:23 -0700
commit34b6527cefd36fbd5da78464ce9771e379158552 (patch)
treeb7884c2d9c7500c54b9e5fcb54161cc2d00904c6 /src/com/android/launcher3/FolderPagedView.java
parent5d85c44fd873c740dc191b28424c2ee367d730a2 (diff)
downloadandroid_packages_apps_Trebuchet-34b6527cefd36fbd5da78464ce9771e379158552.tar.gz
android_packages_apps_Trebuchet-34b6527cefd36fbd5da78464ce9771e379158552.tar.bz2
android_packages_apps_Trebuchet-34b6527cefd36fbd5da78464ce9771e379158552.zip
Lazy loading high res icons
> Loading low-res icons for icons which are not visible on the homescreen. Change-Id: I8ac7bf09f6030ed554cb60a4cd402f3f36ffe12b
Diffstat (limited to 'src/com/android/launcher3/FolderPagedView.java')
-rw-r--r--src/com/android/launcher3/FolderPagedView.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/com/android/launcher3/FolderPagedView.java b/src/com/android/launcher3/FolderPagedView.java
index 529064444..21158b450 100644
--- a/src/com/android/launcher3/FolderPagedView.java
+++ b/src/com/android/launcher3/FolderPagedView.java
@@ -642,6 +642,28 @@ public class FolderPagedView extends PagedView implements Folder.FolderContent {
}
@Override
+ protected void onPageBeginMoving() {
+ super.onPageBeginMoving();
+ getVisiblePages(sTempPosArray);
+ for (int i = sTempPosArray[0]; i <= sTempPosArray[1]; i++) {
+ verifyVisibleHighResIcons(i);
+ }
+ }
+
+ /**
+ * Ensures that all the icons on the given page are of high-res
+ */
+ public void verifyVisibleHighResIcons(int pageNo) {
+ CellLayout page = getPageAt(pageNo);
+ if (page != null) {
+ ShortcutAndWidgetContainer parent = page.getShortcutsAndWidgets();
+ for (int i = parent.getChildCount() - 1; i >= 0; i--) {
+ ((BubbleTextView) parent.getChildAt(i)).verifyHighRes();
+ }
+ }
+ }
+
+ @Override
public void realTimeReorder(int empty, int target) {
completePendingPageChanges();
int delay = 0;