diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-07-16 17:27:43 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-07-17 11:10:05 -0700 |
commit | 3a30cfeb7c805bf99dba9002ac8b22ae66d84378 (patch) | |
tree | cc08f252646afb60f31cf8d67aafa9e91917017e /src/com/android/launcher3/CellLayout.java | |
parent | 36db85679d492888f03654fa04f6c291e74168e7 (diff) | |
download | android_packages_apps_Trebuchet-3a30cfeb7c805bf99dba9002ac8b22ae66d84378.tar.gz android_packages_apps_Trebuchet-3a30cfeb7c805bf99dba9002ac8b22ae66d84378.tar.bz2 android_packages_apps_Trebuchet-3a30cfeb7c805bf99dba9002ac8b22ae66d84378.zip |
Adding minSpanX and minSpanY for all the launcher widgets
Bug: 22353460
Change-Id: Id4450dee42a83e4603dcd56e1c4dec2b0e405858
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index 2cde3d53d..809688712 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -2690,8 +2690,12 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { * @param result An array of length 2 in which to store the result (may be null). */ public static int[] rectToCell(Launcher launcher, int width, int height, int[] result) { - DeviceProfile grid = launcher.getDeviceProfile(); - Rect padding = grid.getWorkspacePadding(Utilities.isRtl(launcher.getResources())); + return rectToCell(launcher.getDeviceProfile(), launcher, width, height, result); + } + + public static int[] rectToCell(DeviceProfile grid, Context context, int width, int height, + int[] result) { + Rect padding = grid.getWorkspacePadding(Utilities.isRtl(context.getResources())); // Always assume we're working with the smallest span to make sure we // reserve enough space in both orientations. |