diff options
author | Winson Chung <winsonc@google.com> | 2011-05-05 17:06:13 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-05-06 16:25:37 -0700 |
commit | 63257c110a4ee54d5e8872c471cce254cf613c7a (patch) | |
tree | 4dc38f02429a6e4c78356ddabb39e1af17dc4b2c /src/com/android/launcher2/CustomizePagedView.java | |
parent | 563ed71d682cc979a095fff7d27f1afe378508df (diff) | |
download | android_packages_apps_Trebuchet-63257c110a4ee54d5e8872c471cce254cf613c7a.tar.gz android_packages_apps_Trebuchet-63257c110a4ee54d5e8872c471cce254cf613c7a.tar.bz2 android_packages_apps_Trebuchet-63257c110a4ee54d5e8872c471cce254cf613c7a.zip |
Minor changes to help address some hiccups when panning, changing tabs and rotating in AppsCustomize.
- Also removing references to old all-apps 2d/3d
Change-Id: Ibe07ad8b4facc5c57b3c82ccf0b55260be61a31b
Diffstat (limited to 'src/com/android/launcher2/CustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher2/CustomizePagedView.java | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java index b61713a76..fd88eb665 100644 --- a/src/com/android/launcher2/CustomizePagedView.java +++ b/src/com/android/launcher2/CustomizePagedView.java @@ -929,12 +929,13 @@ public class CustomizePagedView extends PagedViewWithDraggableItems final int[] cellSpans = CellLayout.rectToCell(getResources(), info.minWidth, info.minHeight, null); final FastBitmapDrawable icon = getWidgetPreview(info); + final boolean createHolographicOutlines = isHardwareAccelerated() && (numPages > 1); PagedViewWidget l = (PagedViewWidget) mInflater.inflate( R.layout.customize_paged_view_widget, layout, false); l.applyFromAppWidgetProviderInfo(info, icon, mMaxWidgetWidth, cellSpans, - mPageViewIconCache, (numPages > 1)); + mPageViewIconCache, createHolographicOutlines); l.setTag(createItemInfo); l.setOnClickListener(this); l.setOnTouchListener(this); @@ -975,11 +976,12 @@ public class CustomizePagedView extends PagedViewWithDraggableItems for (int i = startIndex; i < endIndex; ++i) { final ResolveInfo info = mWallpaperList.get(i); final FastBitmapDrawable icon = getWallpaperPreview(info); + final boolean createHolographicOutlines = isHardwareAccelerated() && (numPages > 1); PagedViewWidget l = (PagedViewWidget) mInflater.inflate( R.layout.customize_paged_view_wallpaper, layout, false); l.applyFromWallpaperInfo(info, mPackageManager, icon, mMaxWidgetWidth, - mPageViewIconCache, (numPages > 1)); + mPageViewIconCache, createHolographicOutlines); l.setTag(info); l.setOnClickListener(this); @@ -1012,12 +1014,13 @@ public class CustomizePagedView extends PagedViewWithDraggableItems for (int i = startIndex; i < endIndex; ++i) { ResolveInfo info = list.get(i); PendingAddItemInfo createItemInfo = new PendingAddItemInfo(); + final boolean createHolographicOutlines = isHardwareAccelerated() && (numPages > 1); PagedViewIcon icon = (PagedViewIcon) mInflater.inflate( R.layout.customize_paged_view_item, layout, false); icon.applyFromResolveInfo(info, mPackageManager, mPageViewIconCache, ((LauncherApplication) mLauncher.getApplication()).getIconCache(), - (numPages > 1)); + createHolographicOutlines); switch (mCustomizationType) { case WallpaperCustomization: icon.setOnClickListener(this); @@ -1039,7 +1042,8 @@ public class CustomizePagedView extends PagedViewWithDraggableItems final int x = index % mCellCountX; final int y = index / mCellCountX; setupPage(layout); - layout.addViewToCellLayout(icon, -1, i, new PagedViewCellLayout.LayoutParams(x,y, 1,1)); + layout.addViewToCellLayout(icon, -1, i, new PagedViewCellLayout.LayoutParams(x,y, 1,1), + createHolographicOutlines); } } @@ -1071,10 +1075,11 @@ public class CustomizePagedView extends PagedViewWithDraggableItems layout.removeAllViewsOnPage(); for (int i = startIndex; i < endIndex; ++i) { final ApplicationInfo info = mApps.get(i); + final boolean createHolographicOutlines = isHardwareAccelerated() && (numPages > 1); PagedViewIcon icon = (PagedViewIcon) mInflater.inflate( R.layout.all_apps_paged_view_application, layout, false); icon.applyFromApplicationInfo( - info, mPageViewIconCache, true, isHardwareAccelerated() && (numPages > 1)); + info, mPageViewIconCache, true, createHolographicOutlines); icon.setOnClickListener(this); icon.setOnTouchListener(this); icon.setOnLongClickListener(this); @@ -1083,7 +1088,8 @@ public class CustomizePagedView extends PagedViewWithDraggableItems final int x = index % mCellCountX; final int y = index / mCellCountX; setupPage(layout); - layout.addViewToCellLayout(icon, -1, i, new PagedViewCellLayout.LayoutParams(x,y, 1,1)); + layout.addViewToCellLayout(icon, -1, i, new PagedViewCellLayout.LayoutParams(x,y, 1,1), + createHolographicOutlines); } } |