mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Create specs for hotseat
Some attributes of hotseat change depending on the size of the device. In the future more attributes could be moved to the spec, e.g. hotseat icons. Fix: 292204436 Test: CalculatedHotseatSpecTest Test: HotseatSpecsTest Test: SizeSpecTest Test: DeviceProfileResponsiveDumpTest Test: DeviceProfileResponsiveAlternativeDisplaysDumpTest Flag: ENABLE_RESPONSIVE_WORKSPACE Change-Id: I6a4e05d75af819dbf1444a5ca45c2080f55dc203
This commit is contained in:
@@ -189,6 +189,8 @@ public class InvariantDeviceProfile {
|
||||
public int folderSpecsId = INVALID_RESOURCE_HANDLE;
|
||||
@XmlRes
|
||||
public int folderSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
public int hotseatSpecsId = INVALID_RESOURCE_HANDLE;
|
||||
public int hotseatSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
|
||||
public String dbFile;
|
||||
public int defaultLayoutId;
|
||||
@@ -368,6 +370,8 @@ public class InvariantDeviceProfile {
|
||||
allAppsSpecsTwoPanelId = closestProfile.mAllAppsSpecsTwoPanelId;
|
||||
folderSpecsId = closestProfile.mFolderSpecsId;
|
||||
folderSpecsTwoPanelId = closestProfile.mFolderSpecsTwoPanelId;
|
||||
hotseatSpecsId = closestProfile.mHotseatSpecsId;
|
||||
hotseatSpecsTwoPanelId = closestProfile.mHotseatSpecsTwoPanelId;
|
||||
this.deviceType = deviceType;
|
||||
|
||||
inlineNavButtonsEndSpacing = closestProfile.inlineNavButtonsEndSpacing;
|
||||
@@ -819,6 +823,8 @@ public class InvariantDeviceProfile {
|
||||
private final int mAllAppsSpecsTwoPanelId;
|
||||
private final int mFolderSpecsId;
|
||||
private final int mFolderSpecsTwoPanelId;
|
||||
private final int mHotseatSpecsId;
|
||||
private final int mHotseatSpecsTwoPanelId;
|
||||
|
||||
public GridOption(Context context, AttributeSet attrs) {
|
||||
TypedArray a = context.obtainStyledAttributes(
|
||||
@@ -896,6 +902,11 @@ public class InvariantDeviceProfile {
|
||||
mFolderSpecsTwoPanelId = a.getResourceId(
|
||||
R.styleable.GridDisplayOption_folderSpecsTwoPanelId,
|
||||
INVALID_RESOURCE_HANDLE);
|
||||
mHotseatSpecsId = a.getResourceId(
|
||||
R.styleable.GridDisplayOption_hotseatSpecsId, INVALID_RESOURCE_HANDLE);
|
||||
mHotseatSpecsTwoPanelId = a.getResourceId(
|
||||
R.styleable.GridDisplayOption_hotseatSpecsTwoPanelId,
|
||||
INVALID_RESOURCE_HANDLE);
|
||||
} else {
|
||||
mWorkspaceSpecsId = INVALID_RESOURCE_HANDLE;
|
||||
mWorkspaceSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
@@ -903,6 +914,8 @@ public class InvariantDeviceProfile {
|
||||
mAllAppsSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
mFolderSpecsId = INVALID_RESOURCE_HANDLE;
|
||||
mFolderSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
mHotseatSpecsId = INVALID_RESOURCE_HANDLE;
|
||||
mHotseatSpecsTwoPanelId = INVALID_RESOURCE_HANDLE;
|
||||
}
|
||||
|
||||
int inlineForRotation = a.getInt(R.styleable.GridDisplayOption_inlineQsb,
|
||||
|
||||
Reference in New Issue
Block a user