From 3a6e7f330e680ef718ca7c0921d842efb4d8bbae Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 9 Oct 2013 15:50:52 -0700 Subject: Initial changes for new clings. (Bug 11142616) Change-Id: Id66ebceb99449941921d9e617dfe0cc05a2e3b65 --- src/com/android/launcher3/ShortcutAndWidgetContainer.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/com/android/launcher3/ShortcutAndWidgetContainer.java') diff --git a/src/com/android/launcher3/ShortcutAndWidgetContainer.java b/src/com/android/launcher3/ShortcutAndWidgetContainer.java index 1cf4c11b6..bb5601e90 100644 --- a/src/com/android/launcher3/ShortcutAndWidgetContainer.java +++ b/src/com/android/launcher3/ShortcutAndWidgetContainer.java @@ -123,6 +123,13 @@ public class ShortcutAndWidgetContainer extends ViewGroup { mIsHotseatLayout = isHotseat; } + int getCellContentWidth() { + final LauncherAppState app = LauncherAppState.getInstance(); + final DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); + return Math.min(getMeasuredHeight(), mIsHotseatLayout ? + grid.hotseatCellWidthPx: grid.cellWidthPx); + } + int getCellContentHeight() { final LauncherAppState app = LauncherAppState.getInstance(); final DeviceProfile grid = app.getDynamicGrid().getDeviceProfile(); -- cgit v1.2.3