summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2015-04-27 18:33:06 -0700
committerRaj Yengisetty <rajesh@cyngn.com>2015-04-28 13:48:25 -0700
commitf6eb35b79a7b9d52e72993c9b3d1e61a95813b7d (patch)
tree2cb13c225780c3b5abd36e4fa4b4a0753d0fb5ba /src/com/android/launcher3
parentf533ad90223718f9b5f6d35adc180618620313a6 (diff)
downloadandroid_packages_apps_Trebuchet-f6eb35b79a7b9d52e72993c9b3d1e61a95813b7d.tar.gz
android_packages_apps_Trebuchet-f6eb35b79a7b9d52e72993c9b3d1e61a95813b7d.tar.bz2
android_packages_apps_Trebuchet-f6eb35b79a7b9d52e72993c9b3d1e61a95813b7d.zip
Trebuchet: limit folder size to numRowsBase and numColumnsBase
Otherwise the size of the folder is determined by the size of the Dynamic Grid. This causes some weird issues with sizes and scrolling so just cap this to the base values for the numRows and numColumns. Change-Id: I5b1f13267299d3ab1f28e6e393d6260fa7fbdd3e
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r--src/com/android/launcher3/Folder.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 7267f327c..e66838fa3 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -166,12 +166,12 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
mIconCache = app.getIconCache();
Resources res = getResources();
- mMaxCountX = (int) grid.numColumns;
+ mMaxCountX = (int) grid.numColumnsBase;
// Allow scrolling folders when DISABLE_ALL_APPS is true.
if (LauncherAppState.isDisableAllApps()) {
mMaxCountY = mMaxNumItems = Integer.MAX_VALUE;
} else {
- mMaxCountY = (int) grid.numRows;
+ mMaxCountY = (int) grid.numRowsBase;
mMaxNumItems = mMaxCountX * mMaxCountY;
}
@@ -1158,16 +1158,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
}
private int getContentAreaHeight() {
- LauncherAppState app = LauncherAppState.getInstance();
- DeviceProfile grid = app.getDynamicGrid().getDeviceProfile();
- Rect workspacePadding = grid.getWorkspacePadding(grid.isLandscape ?
- CellLayout.LANDSCAPE : CellLayout.PORTRAIT);
- int maxContentAreaHeight = grid.availableHeightPx -
- workspacePadding.top - workspacePadding.bottom -
- mFolderNameHeight;
- int height = Math.min(maxContentAreaHeight,
- mContent.getDesiredHeight());
- return Math.max(height, MIN_CONTENT_DIMEN);
+ return Math.max(mContent.getDesiredHeight(), MIN_CONTENT_DIMEN);
}
private int getContentAreaWidth() {