summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/InvariantDeviceProfile.java
diff options
context:
space:
mode:
authorAdam Cohen <adamcohen@google.com>2017-09-22 17:10:55 -0700
committerAdam Cohen <adamcohen@google.com>2017-09-29 15:49:34 +0000
commit2782449da6538e19ae8fdcdd56bb524937fcd604 (patch)
tree965fac5258fe2d011aa838811bcb4b569c30f21f /src/com/android/launcher3/InvariantDeviceProfile.java
parent48a4e91c73309342da224c218bbfb780ea30efed (diff)
downloadandroid_packages_apps_Trebuchet-2782449da6538e19ae8fdcdd56bb524937fcd604.tar.gz
android_packages_apps_Trebuchet-2782449da6538e19ae8fdcdd56bb524937fcd604.tar.bz2
android_packages_apps_Trebuchet-2782449da6538e19ae8fdcdd56bb524937fcd604.zip
Demo mode default layout support
67062454 Change-Id: Ic060d3d7dba4fffe688dddf7cd04c48e4baaf813
Diffstat (limited to 'src/com/android/launcher3/InvariantDeviceProfile.java')
-rw-r--r--src/com/android/launcher3/InvariantDeviceProfile.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/com/android/launcher3/InvariantDeviceProfile.java b/src/com/android/launcher3/InvariantDeviceProfile.java
index d7bebd1b1..7a431986d 100644
--- a/src/com/android/launcher3/InvariantDeviceProfile.java
+++ b/src/com/android/launcher3/InvariantDeviceProfile.java
@@ -85,7 +85,9 @@ public class InvariantDeviceProfile {
* Number of icons inside the hotseat area.
*/
public int numHotseatIcons;
+
int defaultLayoutId;
+ int demoModeLayoutId;
public DeviceProfile landscapeProfile;
public DeviceProfile portraitProfile;
@@ -99,11 +101,11 @@ public class InvariantDeviceProfile {
this(p.name, p.minWidthDps, p.minHeightDps, p.numRows, p.numColumns,
p.numFolderRows, p.numFolderColumns, p.minAllAppsPredictionColumns,
p.iconSize, p.landscapeIconSize, p.iconTextSize, p.numHotseatIcons,
- p.defaultLayoutId);
+ p.defaultLayoutId, p.demoModeLayoutId);
}
InvariantDeviceProfile(String n, float w, float h, int r, int c, int fr, int fc, int maapc,
- float is, float lis, float its, int hs, int dlId) {
+ float is, float lis, float its, int hs, int dlId, int dmlId) {
name = n;
minWidthDps = w;
minHeightDps = h;
@@ -117,6 +119,7 @@ public class InvariantDeviceProfile {
iconTextSize = its;
numHotseatIcons = hs;
defaultLayoutId = dlId;
+ demoModeLayoutId = dmlId;
}
@TargetApi(23)
@@ -144,6 +147,7 @@ public class InvariantDeviceProfile {
numColumns = closestProfile.numColumns;
numHotseatIcons = closestProfile.numHotseatIcons;
defaultLayoutId = closestProfile.defaultLayoutId;
+ demoModeLayoutId = closestProfile.demoModeLayoutId;
numFolderRows = closestProfile.numFolderRows;
numFolderColumns = closestProfile.numFolderColumns;
minAllAppsPredictionColumns = closestProfile.minAllAppsPredictionColumns;
@@ -208,7 +212,8 @@ public class InvariantDeviceProfile {
a.getFloat(R.styleable.InvariantDeviceProfile_landscapeIconSize, iconSize),
a.getFloat(R.styleable.InvariantDeviceProfile_iconTextSize, 0),
a.getInt(R.styleable.InvariantDeviceProfile_numHotseatIcons, numColumns),
- a.getResourceId(R.styleable.InvariantDeviceProfile_defaultLayoutId, 0)));
+ a.getResourceId(R.styleable.InvariantDeviceProfile_defaultLayoutId, 0),
+ a.getResourceId(R.styleable.InvariantDeviceProfile_demoModeLayoutId, 0)));
a.recycle();
}
}