summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/ShortcutAndWidgetContainer.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2013-10-09 15:50:52 -0700
committerWinson Chung <winsonc@google.com>2013-10-09 17:53:32 -0700
commit3a6e7f330e680ef718ca7c0921d842efb4d8bbae (patch)
tree260e400c897a77d6727e5ea5f933864fa2ac1ace /src/com/android/launcher3/ShortcutAndWidgetContainer.java
parent558f1c2ac73c3a0c3c0c316222b6b7f9c76e2501 (diff)
downloadandroid_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.tar.gz
android_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.tar.bz2
android_packages_apps_Trebuchet-3a6e7f330e680ef718ca7c0921d842efb4d8bbae.zip
Initial changes for new clings. (Bug 11142616)
Change-Id: Id66ebceb99449941921d9e617dfe0cc05a2e3b65
Diffstat (limited to 'src/com/android/launcher3/ShortcutAndWidgetContainer.java')
-rw-r--r--src/com/android/launcher3/ShortcutAndWidgetContainer.java7
1 files changed, 7 insertions, 0 deletions
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();