summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-08-03 14:48:25 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-03 14:48:25 -0700
commit459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c (patch)
treeaa2e652ae8388b425107a49673d90da41609682a /src
parent7578ec6fa9a747210aba484d226b5f97773752e3 (diff)
parent54c725cc294cd43ed0650179bfae64a622547660 (diff)
downloadandroid_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.gz
android_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.tar.bz2
android_packages_apps_Trebuchet-459814b7e6d6c9bb6b0569dcedb455f6fab3aa9c.zip
Merge "Bug fixes"
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher2/AppsCustomizePagedView.java10
-rw-r--r--src/com/android/launcher2/CellLayout.java4
2 files changed, 10 insertions, 4 deletions
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index e5fe7bd26..53d154ff0 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 0a3c96dc4..d9d048788 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 };