diff options
author | Winson Chung <winsonc@google.com> | 2014-05-14 14:15:20 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2014-05-16 12:33:38 -0700 |
commit | be87647e2ade2f442159e60da81d1c5a57eba8a9 (patch) | |
tree | 787e750408964babed5921cfebc4f5c5c0231624 /src/com/android/launcher3/DynamicGrid.java | |
parent | 244637b59c328b918c6b2e1aef33ba448728207d (diff) | |
download | android_packages_apps_Trebuchet-be87647e2ade2f442159e60da81d1c5a57eba8a9.tar.gz android_packages_apps_Trebuchet-be87647e2ade2f442159e60da81d1c5a57eba8a9.tar.bz2 android_packages_apps_Trebuchet-be87647e2ade2f442159e60da81d1c5a57eba8a9.zip |
Adding support for dynamically resolved default layouts.
Change-Id: Id05c60b93423ce37dd06a126ecf33c74a0ba1d62
Diffstat (limited to 'src/com/android/launcher3/DynamicGrid.java')
-rw-r--r-- | src/com/android/launcher3/DynamicGrid.java | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java index 447bb1cd8..94a07d706 100644 --- a/src/com/android/launcher3/DynamicGrid.java +++ b/src/com/android/launcher3/DynamicGrid.java @@ -60,36 +60,41 @@ public class DynamicGrid { DEFAULT_ICON_SIZE_PX = pxFromDp(DEFAULT_ICON_SIZE_DP, dm); // Our phone profiles include the bar sizes in each orientation deviceProfiles.add(new DeviceProfile("Super Short Stubby", - 255, 300, 2, 3, 48, 13, (hasAA ? 5 : 5), 48)); + 255, 300, 2, 3, 48, 13, (hasAA ? 3 : 5), 48, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Shorter Stubby", - 255, 400, 3, 3, 48, 13, (hasAA ? 5 : 5), 48)); + 255, 400, 3, 3, 48, 13, (hasAA ? 3 : 5), 48, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Short Stubby", - 275, 420, 3, 4, 48, 13, (hasAA ? 5 : 5), 48)); + 275, 420, 3, 4, 48, 13, (hasAA ? 5 : 5), 48, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Stubby", - 255, 450, 3, 4, 48, 13, (hasAA ? 5 : 5), 48)); + 255, 450, 3, 4, 48, 13, (hasAA ? 5 : 5), 48, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Nexus S", - 296, 491.33f, 4, 4, 48, 13, (hasAA ? 5 : 5), 48)); + 296, 491.33f, 4, 4, 48, 13, (hasAA ? 5 : 5), 48, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Nexus 4", - 335, 567, 4, 4, DEFAULT_ICON_SIZE_DP, 13, (hasAA ? 5 : 5), 56)); + 335, 567, 4, 4, DEFAULT_ICON_SIZE_DP, 13, (hasAA ? 5 : 5), 56, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Nexus 5", - 359, 567, 4, 4, DEFAULT_ICON_SIZE_DP, 13, (hasAA ? 5 : 5), 56)); + 359, 567, 4, 4, DEFAULT_ICON_SIZE_DP, 13, (hasAA ? 5 : 5), 56, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); deviceProfiles.add(new DeviceProfile("Large Phone", - 406, 694, 5, 5, 64, 14.4f, 5, 56)); + 406, 694, 5, 5, 64, 14.4f, 5, 56, R.xml.default_workspace_5x5, + R.xml.default_workspace_5x5_no_all_apps)); // The tablet profile is odd in that the landscape orientation // also includes the nav bar on the side deviceProfiles.add(new DeviceProfile("Nexus 7", - 575, 904, 5, 6, 72, 14.4f, 7, 60)); + 575, 904, 5, 6, 72, 14.4f, 7, 60, R.xml.default_workspace_5x6, + R.xml.default_workspace_5x6_no_all_apps)); // Larger tablet profiles always have system bars on the top & bottom deviceProfiles.add(new DeviceProfile("Nexus 10", - 727, 1207, 5, 6, 76, 14.4f, 7, 64)); - /* - deviceProfiles.add(new DeviceProfile("Nexus 7", - 600, 960, 5, 5, 72, 14.4f, 5, 60)); - deviceProfiles.add(new DeviceProfile("Nexus 10", - 800, 1280, 5, 5, 80, 14.4f, (hasAA ? 7 : 6), 64)); - */ + 727, 1207, 5, 6, 76, 14.4f, 7, 64, R.xml.default_workspace_5x6, + R.xml.default_workspace_5x6_no_all_apps)); deviceProfiles.add(new DeviceProfile("20-inch Tablet", - 1527, 2527, 7, 7, 100, 20, 7, 72)); + 1527, 2527, 7, 7, 100, 20, 7, 72, R.xml.default_workspace_4x4, + R.xml.default_workspace_4x4_no_all_apps)); mMinWidth = dpiFromPx(minWidthPx, dm); mMinHeight = dpiFromPx(minHeightPx, dm); mProfile = new DeviceProfile(context, deviceProfiles, |