summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/DeviceProfile.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-05-11 11:38:19 -0700
committerSunny Goyal <sunnygoyal@google.com>2015-05-11 11:38:46 -0700
commitfee35bbfac29a55382880f846fff86003e615ccb (patch)
treeae71ad05b99d1e697d531b66fd4c0a3ea9863ef1 /src/com/android/launcher3/DeviceProfile.java
parent99d96ba6c8e3258f7d99a33d49da2aeb0da5d862 (diff)
downloadandroid_packages_apps_Trebuchet-fee35bbfac29a55382880f846fff86003e615ccb.tar.gz
android_packages_apps_Trebuchet-fee35bbfac29a55382880f846fff86003e615ccb.tar.bz2
android_packages_apps_Trebuchet-fee35bbfac29a55382880f846fff86003e615ccb.zip
Updating folder grid sizes for various devices
Change-Id: Ifd5930a4d6f54428500c0ef61ef21c0fc6a6f5cd
Diffstat (limited to 'src/com/android/launcher3/DeviceProfile.java')
-rw-r--r--src/com/android/launcher3/DeviceProfile.java22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 918517ebd..94589ad87 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;
@@ -138,8 +140,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");
@@ -148,8 +151,12 @@ public class DeviceProfile {
name = n;
minWidthDps = w;
minHeightDps = h;
+
numRows = r;
numColumns = c;
+ numFolderRows = fr;
+ numFolderColumns = fc;
+
iconSize = is;
iconTextSize = its;
numHotseatIcons = hs;
@@ -210,6 +217,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);
@@ -266,8 +276,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;