diff options
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index 883e8c642..91a7ab20a 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -526,9 +526,15 @@ public class DeviceProfile { } public static int calculateCellWidth(int width, int countX) { + if (countX == 0) { + countX = 4; + } return width / countX; } public static int calculateCellHeight(int height, int countY) { + if (countY == 0) { + countY = 5; + } return height / countY; } |