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
This commit is contained in:
Winson Chung committed 2013-11-14 11:18:18 -08:00
1 parent e248b83797
commit eeb5bbc940
8 files changed
+50 -28

No files matched your search

@@ -915,6 +915,13 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
return true;
}
@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();