Changing default screen to 0

Change-Id: I16b2440f99d4b91a3a74226cdac7054e7d5fd7f5
This commit is contained in:
Adam Cohen
2013-06-06 21:35:12 -07:00
parent f0f4eda318
commit 9efb412971
5 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -39,7 +39,7 @@
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
launcher:cellCountX="@integer/cell_count_x"
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
+1 -1
View File
@@ -57,7 +57,7 @@
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
launcher:cellCountX="@integer/cell_count_x"
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
+1 -1
View File
@@ -57,7 +57,7 @@
android:paddingEnd="@dimen/workspace_right_padding"
android:paddingTop="@dimen/workspace_top_padding"
android:paddingBottom="@dimen/workspace_bottom_padding"
launcher:defaultScreen="2"
launcher:defaultScreen="@integer/config_workspaceDefaultScreen"
launcher:cellCountX="@integer/cell_count_x"
launcher:cellCountY="@integer/cell_count_y"
launcher:pageSpacing="@dimen/workspace_page_spacing"
+2
View File
@@ -24,6 +24,8 @@
<integer name="config_appsCustomizeWorkspaceAnimationStagger">40</integer>
<integer name="config_workspaceAppsCustomizeAnimationStagger">100</integer>
<integer name="config_workspaceDefaultScreen">0</integer>
<!-- Tab transition animation duration -->
<integer name="config_tabTransitionDuration">250</integer>
@@ -253,8 +253,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
// Try adding to the workspace screens incrementally, starting at the default or center
// screen and alternating between +1, -1, +2, -2, etc. (using ~ ceil(i/2f)*(-1)^(i-1))
final int screen = Launcher.DEFAULT_SCREEN;
for (int i = 0; i < (2 * Launcher.SCREEN_COUNT) + 1 && !found; ++i) {
int si = screen + (int) ((i / 2f) + 0.5f) * ((i % 2 == 1) ? 1 : -1);
for (int i = 0; i < Launcher.SCREEN_COUNT; i++) {
int si = i;
if (0 <= si && si < Launcher.SCREEN_COUNT) {
found = installShortcut(context, data, items, name, intent, si, exists, sp,
result);