diff options
author | dwardo <benjamin.reveille@gmail.com> | 2020-04-07 22:36:48 +0200 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-05-07 15:53:40 +0800 |
commit | fe0a43f11d26ddb3b78c79b0a9eaf6c7c447bc20 (patch) | |
tree | 3e1232644cd547d1520d97916f0b722882d644f0 | |
parent | 630a7d01035aab24e873b1ac0993d33a6a7daed9 (diff) |
Launcher3: Add 5x6 workspace grid option
Change-Id: Ib8d5dcc70d386376755c0a57b009ced1b2ee0834
-rw-r--r-- | res/xml/default_workspace_5x6.xml | 109 | ||||
-rw-r--r-- | res/xml/device_profiles.xml | 21 | ||||
-rw-r--r-- | src/com/android/launcher3/LauncherFiles.java | 2 |
3 files changed, 132 insertions, 0 deletions
diff --git a/res/xml/default_workspace_5x6.xml b/res/xml/default_workspace_5x6.xml new file mode 100644 index 0000000000..7cba7ac335 --- /dev/null +++ b/res/xml/default_workspace_5x6.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2009 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<favorites xmlns:launcher="http://schemas.android.com/apk/res-auto/com.android.launcher3"> + + <!-- Smartspace Widget --> + <appwidget + launcher:screen="0" + launcher:x="0" + launcher:y="0" + launcher:spanX="5" + launcher:spanY="1" + launcher:packageName="com.google.android.googlequicksearchbox" + launcher:className="com.google.android.apps.gsa.staticplugins.smartspace.widget.SmartspaceWidgetProvider" /> + + <!-- Hotseat (We use the screen as the position of the item in the hotseat) --> + <!-- Dialer, Messaging, [Maps/Music/Settings], Browser, Camera --> + <resolve + launcher:container="-101" + launcher:screen="0" + launcher:x="0" + launcher:y="0" > + <favorite launcher:uri="#Intent;action=android.intent.action.DIAL;end" /> + <favorite launcher:uri="tel:123" /> + <favorite launcher:uri="#Intent;action=android.intent.action.CALL_BUTTON;end" /> + </resolve> + + <resolve + launcher:container="-101" + launcher:screen="1" + launcher:x="1" + launcher:y="0" > + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MESSAGING;end" /> + <favorite launcher:uri="sms:" /> + <favorite launcher:uri="smsto:" /> + <favorite launcher:uri="mms:" /> + <favorite launcher:uri="mmsto:" /> + </resolve> + + <resolve + launcher:container="-101" + launcher:screen="2" + launcher:x="2" + launcher:y="0" > + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MAPS;end" /> + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MUSIC;end" /> + <favorite launcher:uri="#Intent;action=android.settings.SETTINGS;end" /> + </resolve> + + <resolve + launcher:container="-101" + launcher:screen="3" + launcher:x="3" + launcher:y="0" > + <favorite + launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_BROWSER;end" /> + <favorite launcher:uri="http://www.example.com/" /> + </resolve> + + <resolve + launcher:container="-101" + launcher:screen="4" + launcher:x="4" + launcher:y="0" > + <favorite launcher:uri="#Intent;action=android.media.action.STILL_IMAGE_CAMERA;end" /> + <favorite launcher:uri="#Intent;action=android.intent.action.CAMERA_BUTTON;end" /> + </resolve> + + <!-- Bottom row --> + <resolve + launcher:screen="0" + launcher:x="0" + launcher:y="-1" > + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_EMAIL;end" /> + <favorite launcher:uri="mailto:" /> + + </resolve> + + <resolve + launcher:screen="0" + launcher:x="1" + launcher:y="-1" > + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_GALLERY;end" /> + <favorite launcher:uri="#Intent;type=images/*;end" /> + + </resolve> + + <resolve + launcher:screen="0" + launcher:x="4" + launcher:y="-1" > + <favorite launcher:uri="#Intent;action=android.intent.action.MAIN;category=android.intent.category.APP_MARKET;end" /> + <favorite launcher:uri="market://details?id=com.android.launcher" /> + </resolve> + +</favorites> diff --git a/res/xml/device_profiles.xml b/res/xml/device_profiles.xml index 490d9ae88a..53872d240a 100644 --- a/res/xml/device_profiles.xml +++ b/res/xml/device_profiles.xml @@ -137,6 +137,27 @@ </grid-option> <grid-option + launcher:name="5_by_6" + launcher:numRows="6" + launcher:numColumns="5" + launcher:numFolderRows="5" + launcher:numFolderColumns="4" + launcher:numHotseatIcons="5" + launcher:dbFile="launcher_5_by_6.db" + launcher:defaultLayoutId="@xml/default_workspace_5x6" + launcher:deviceCategory="phone|multi_display" > + + <display-option + launcher:name="Large Phone" + launcher:minWidthDps="406" + launcher:minHeightDps="694" + launcher:iconImageSize="56" + launcher:iconTextSize="13.0" + launcher:canBeDefault="true" /> + + </grid-option> + + <grid-option launcher:name="6_by_5" launcher:numRows="5" launcher:numColumns="6" diff --git a/src/com/android/launcher3/LauncherFiles.java b/src/com/android/launcher3/LauncherFiles.java index c3b518bb0f..33f2843d1d 100644 --- a/src/com/android/launcher3/LauncherFiles.java +++ b/src/com/android/launcher3/LauncherFiles.java @@ -17,6 +17,7 @@ public class LauncherFiles { public static final String LAUNCHER_DB = "launcher.db"; public static final String LAUNCHER_6_BY_5_DB = "launcher_6_by_5.db"; + public static final String LAUNCHER_5_BY_6_DB = "launcher_5_by_6.db"; public static final String LAUNCHER_4_BY_5_DB = "launcher_4_by_5.db"; public static final String LAUNCHER_3_BY_3_DB = "launcher_3_by_3.db"; public static final String LAUNCHER_2_BY_2_DB = "launcher_2_by_2.db"; @@ -33,6 +34,7 @@ public class LauncherFiles { public static final List<String> GRID_DB_FILES = Collections.unmodifiableList(Arrays.asList( LAUNCHER_DB, LAUNCHER_6_BY_5_DB, + LAUNCHER_5_BY_6_DB, LAUNCHER_4_BY_5_DB, LAUNCHER_3_BY_3_DB, LAUNCHER_2_BY_2_DB)); |