diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-05-11 22:53:47 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-05-11 22:53:47 +0000 |
commit | bcae8f0272f4e1c7a8736de22d96924759cbc3c6 (patch) | |
tree | cca2c81c96a95385ee68e8213b77958e3bb33145 /src/com/android/launcher3/DeviceProfile.java | |
parent | f385e3c058f052073af5ac559c8fd5627046870c (diff) | |
parent | fee35bbfac29a55382880f846fff86003e615ccb (diff) | |
download | android_packages_apps_Trebuchet-bcae8f0272f4e1c7a8736de22d96924759cbc3c6.tar.gz android_packages_apps_Trebuchet-bcae8f0272f4e1c7a8736de22d96924759cbc3c6.tar.bz2 android_packages_apps_Trebuchet-bcae8f0272f4e1c7a8736de22d96924759cbc3c6.zip |
Merge "Updating folder grid sizes for various devices" into ub-launcher3-burnaby
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r-- | src/com/android/launcher3/DeviceProfile.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java index c1dd85961..7a6e9a20a 100644 --- a/src/com/android/launcher3/DeviceProfile.java +++ b/src/com/android/launcher3/DeviceProfile.java @@ -69,8 +69,10 @@ public class DeviceProfile { String name; float minWidthDps; float minHeightDps; - public float numRows; - public float numColumns; + public int numRows; + public int numColumns; + public int numFolderRows; + public int numFolderColumns; float numHotseatIcons; float iconSize; private float iconTextSize; @@ -137,8 +139,9 @@ public class DeviceProfile { private ArrayList<DeviceProfileCallbacks> mCallbacks = new ArrayList<DeviceProfileCallbacks>(); - DeviceProfile(String n, float w, float h, float r, float c, - float is, float its, float hs, float his, int dlId) { + DeviceProfile(String n, float w, float h, + int r, int c, int fr, int fc, + float is, float its, float hs, float his, int dlId) { // Ensure that we have an odd number of hotseat items (since we need to place all apps) if (hs % 2 == 0) { throw new RuntimeException("All Device Profiles must have an odd number of hotseat spaces"); @@ -147,8 +150,12 @@ public class DeviceProfile { name = n; minWidthDps = w; minHeightDps = h; + numRows = r; numColumns = c; + numFolderRows = fr; + numFolderColumns = fc; + iconSize = is; iconTextSize = its; numHotseatIcons = hs; @@ -209,6 +216,9 @@ public class DeviceProfile { // Snap to the closest column count numColumns = closestProfile.numColumns; + numFolderRows = closestProfile.numFolderRows; + numFolderColumns = closestProfile.numFolderColumns; + // Snap to the closest hotseat size numHotseatIcons = closestProfile.numHotseatIcons; hotseatAllAppsRank = (int) (numHotseatIcons / 2); @@ -265,8 +275,8 @@ public class DeviceProfile { DeviceProfile partnerDp = p.getDeviceProfileOverride(dm); if (partnerDp != null) { if (partnerDp.numRows > 0 && partnerDp.numColumns > 0) { - numRows = partnerDp.numRows; - numColumns = partnerDp.numColumns; + numRows = numFolderRows = partnerDp.numRows; + numColumns = numFolderColumns = partnerDp.numColumns; } if (partnerDp.allAppsShortEdgeCount > 0 && partnerDp.allAppsLongEdgeCount > 0) { allAppsShortEdgeCount = partnerDp.allAppsShortEdgeCount; |