Add twoPanelId attribute for responsive grid in device profile
Three new attributes were created to be used in device profile. These attributes will provide the responsive specs for two panel devices. Fix: 292204121 Flag: ENABLE_RESPONSIVE_WORKSPACE Test: DeviceProfileDumpTest Test: DeviceProfileResponsiveDumpTest Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest Change-Id: I35c93e16dde043b0fd611b81bf2de74e3621818e
This commit is contained in:
1 parent
5cc62b13ee
commit
575c3bddec
3 files changed
+33
-3
No files matched your search
@@ -543,7 +543,8 @@ public class DeviceProfile {
|
||||
// for the available height to be correct
|
||||
if (mIsResponsiveGrid) {
|
||||
WorkspaceSpecs workspaceSpecs = WorkspaceSpecs.create(
|
||||
new ResourceHelper(context, inv.workspaceSpecsId));
|
||||
new ResourceHelper(context,
|
||||
isTwoPanels ? inv.workspaceSpecsTwoPanelId : inv.workspaceSpecsId));
|
||||
int availableResponsiveWidth =
|
||||
availableWidthPx - (isVerticalBarLayout() ? hotseatBarSizePx : 0);
|
||||
int numColumns = getPanelCount() * inv.numColumns;
|
||||
@@ -557,14 +558,16 @@ public class DeviceProfile {
|
||||
availableResponsiveHeight);
|
||||
|
||||
AllAppsSpecs allAppsSpecs = AllAppsSpecs.create(
|
||||
new ResourceHelper(context, inv.allAppsSpecsId));
|
||||
new ResourceHelper(context,
|
||||
isTwoPanels ? inv.allAppsSpecsTwoPanelId : inv.allAppsSpecsId));
|
||||
mAllAppsResponsiveWidthSpec = allAppsSpecs.getCalculatedWidthSpec(numColumns,
|
||||
mResponsiveWidthSpec.getAvailableSpace(), mResponsiveWidthSpec);
|
||||
mAllAppsResponsiveHeightSpec = allAppsSpecs.getCalculatedHeightSpec(inv.numRows,
|
||||
mResponsiveHeightSpec.getAvailableSpace(), mResponsiveHeightSpec);
|
||||
|
||||
FolderSpecs folderSpecs = FolderSpecs.create(
|
||||
new ResourceHelper(context, inv.folderSpecsId));
|
||||
new ResourceHelper(context,
|
||||
isTwoPanels ? inv.folderSpecsTwoPanelId : inv.folderSpecsId));
|
||||
mResponsiveFolderWidthSpec = folderSpecs.getCalculatedWidthSpec(inv.numFolderColumns,
|
||||
mResponsiveWidthSpec.getAvailableSpace(), mResponsiveWidthSpec);
|
||||
mResponsiveFolderHeightSpec = folderSpecs.getCalculatedHeightSpec(inv.numFolderRows,
|
||||
|
||||
Reference in new issue
Block a user