diff options
author | Winson Chung <winsonc@google.com> | 2013-08-22 16:15:50 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2013-08-23 12:13:02 -0700 |
commit | 892c74d460ad98c6306420e1127c9aa3e505ba25 (patch) | |
tree | 5abbb89efdad34335ef876284d520f6c7a705e3f /src/com/android/launcher3/Workspace.java | |
parent | fe14e04987a8baf77f0ffbd6d66839f33a4f0474 (diff) | |
download | android_packages_apps_Trebuchet-892c74d460ad98c6306420e1127c9aa3e505ba25.tar.gz android_packages_apps_Trebuchet-892c74d460ad98c6306420e1127c9aa3e505ba25.tar.bz2 android_packages_apps_Trebuchet-892c74d460ad98c6306420e1127c9aa3e505ba25.zip |
Fixing folders to always show in view, removing old assets and references to LauncherModel count.
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 2298c5392..ba18b8de7 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -2580,6 +2580,8 @@ public class Workspace extends SmoothPagedView Point smallestSize = new Point(); Point largestSize = new Point(); display.getCurrentSizeRange(smallestSize, largestSize); + int countX = (int) grid.numColumns; + int countY = (int) grid.numRows; if (orientation == CellLayout.LANDSCAPE) { if (mLandscapeCellLayoutMetrics == null) { Rect padding = grid.getWorkspacePadding(CellLayout.LANDSCAPE); @@ -2587,7 +2589,7 @@ public class Workspace extends SmoothPagedView int height = smallestSize.y - padding.top - padding.bottom; mLandscapeCellLayoutMetrics = new Rect(); CellLayout.getMetrics(mLandscapeCellLayoutMetrics, width, height, - LauncherModel.getCellCountX(), LauncherModel.getCellCountY()); + countX, countY); } return mLandscapeCellLayoutMetrics; } else if (orientation == CellLayout.PORTRAIT) { @@ -2597,7 +2599,7 @@ public class Workspace extends SmoothPagedView int height = largestSize.y - padding.top - padding.bottom; mPortraitCellLayoutMetrics = new Rect(); CellLayout.getMetrics(mPortraitCellLayoutMetrics, width, height, - LauncherModel.getCellCountX(), LauncherModel.getCellCountY()); + countX, countY); } return mPortraitCellLayoutMetrics; } |