diff options
author | Winson Chung <winsonc@google.com> | 2013-11-13 15:47:05 -0800 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2014-06-06 22:54:14 -0700 |
commit | 57529fe246212966da65700afa20fc135c2bbc88 (patch) | |
tree | caaf2a37ed7296388c725691490bdd0b1a2d625d /src/com/android/launcher3/AppsCustomizePagedView.java | |
parent | 32f1110ae23676000fa3ef59df8b03213a2ece6a (diff) | |
download | android_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.tar.gz android_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.tar.bz2 android_packages_apps_Trebuchet-57529fe246212966da65700afa20fc135c2bbc88.zip |
Use the icon bounds for all calculations.
- Fixes a drag and drop issue when the dynamic
grid scales icons down, due to the drawable bounds
not being equal to their bitmap sizes.
Change-Id: If7c68b51131de7bac3195a2619e22340f7789432
Diffstat (limited to 'src/com/android/launcher3/AppsCustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher3/AppsCustomizePagedView.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/android/launcher3/AppsCustomizePagedView.java b/src/com/android/launcher3/AppsCustomizePagedView.java index 6d8ad0f1e..11e85f8c0 100644 --- a/src/com/android/launcher3/AppsCustomizePagedView.java +++ b/src/com/android/launcher3/AppsCustomizePagedView.java @@ -996,6 +996,13 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen } @Override + public float getIntrinsicIconScaleFactor() { + LauncherAppState app = LauncherAppState.getInstance(); + DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); + return (float) grid.allAppsIconSizePx / grid.iconSizePx; + } + + @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); cancelAllTasks(); |