diff options
author | Winson Chung <winsonc@google.com> | 2011-08-03 14:48:25 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-03 14:48:25 -0700 |
commit | 459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c (patch) | |
tree | aa2e652ae8388b425107a49673d90da41609682a /src | |
parent | 7578ec6fa9a747210aba484d226b5f97773752e3 (diff) | |
parent | 54c725cc294cd43ed0650179bfae64a622547660 (diff) | |
download | packages_apps_trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.zip packages_apps_trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.gz packages_apps_trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.bz2 |
Merge "Bug fixes"
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher2/AppsCustomizePagedView.java | 10 | ||||
-rw-r--r-- | src/com/android/launcher2/CellLayout.java | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java index e5fe7bd..53d154f 100644 --- a/src/com/android/launcher2/AppsCustomizePagedView.java +++ b/src/com/android/launcher2/AppsCustomizePagedView.java @@ -228,6 +228,7 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen // (top + bottom) mWidgetPreviewIconPaddedDimension = (int) (mAppIconSize * (1 + (2 * sWidgetPreviewIconPaddingPercentage))); + mFadeInAdjacentScreens = LauncherApplication.isScreenLarge(); } @Override @@ -567,7 +568,9 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen layout.allowHardwareLayerCreation(); layout.createHardwareLayers(); - prepareGenerateHoloOutlinesTask(page, items, images); + if (mFadeInAdjacentScreens) { + prepareGenerateHoloOutlinesTask(page, items, images); + } } /** @@ -929,7 +932,10 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen invalidate(); forceUpdateAdjacentPagesAlpha(); - prepareGenerateHoloOutlinesTask(data.page, data.items, data.generatedImages); + + if (mFadeInAdjacentScreens) { + prepareGenerateHoloOutlinesTask(data.page, data.items, data.generatedImages); + } } private void onHolographicPageItemsLoaded(AsyncTaskPageData data) { // Invalidate early to short-circuit children invalidates diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java index 0a3c96d..d9d0487 100644 --- a/src/com/android/launcher2/CellLayout.java +++ b/src/com/android/launcher2/CellLayout.java @@ -1528,8 +1528,8 @@ public class CellLayout extends ViewGroup { int smallerSize = Math.min(actualWidth, actualHeight); // Always round up to next largest cell - int spanX = (width + smallerSize) / smallerSize; - int spanY = (height + smallerSize) / smallerSize; + int spanX = (int) Math.ceil(width / (float) smallerSize); + int spanY = (int) Math.ceil(height / (float) smallerSize); if (result == null) { return new int[] { spanX, spanY }; |