From 557d6ed50cc6560163440aa134870ef0bb11415b Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 8 Jul 2011 15:34:52 -0700 Subject: [PATCH] Fixing issues with spring loaded adding. - Delaying until items are added - Showing bg when going into spring loaded mode - Fixing regression where dropping widgets on full page would not trigger a notification - Fixing regression on tablet where pages were no longer being rotated or shown Change-Id: Iadc0c406f0c065c5029addea1abfee395eed81b9 --- .../apps_customize_application.xml} | 19 +- res/layout-land/launcher.xml | 3 +- res/layout-large-port/workspace.xml | 30 ---- .../workspace.xml | 2 +- .../apps_customize_application.xml | 2 +- res/layout-port/launcher.xml | 3 +- res/layout/apps_customize_pane.xml | 18 +- res/layout/tab_widget_indicator.xml | 2 +- res/values-land/dimens.xml | 22 ++- res/values-land/styles.xml | 5 + res/values-large-land/dimens.xml | 13 +- res/values-large-port/dimens.xml | 13 +- res/values-large/dimens.xml | 4 +- res/values-large/styles.xml | 6 +- res/values-port/dimens.xml | 17 +- res/values-xlarge-port/dimens.xml | 2 +- res/values/config.xml | 2 + res/values/dimens.xml | 8 +- res/values/styles.xml | 29 +++- .../launcher2/AppsCustomizePagedView.java | 10 +- src/com/android/launcher2/DragLayer.java | 63 +++++-- src/com/android/launcher2/DropTarget.java | 3 + src/com/android/launcher2/FolderIcon.java | 13 +- src/com/android/launcher2/Launcher.java | 50 ++++-- src/com/android/launcher2/PagedView.java | 13 +- .../launcher2/SearchDropTargetBar.java | 1 - src/com/android/launcher2/Workspace.java | 162 +++++++++--------- 27 files changed, 302 insertions(+), 213 deletions(-) rename res/{layout-large/tab_widget_indicator.xml => layout-land/apps_customize_application.xml} (55%) delete mode 100644 res/layout-large-port/workspace.xml rename res/{layout-large-land => layout-large}/workspace.xml (95%) rename res/{layout => layout-port}/apps_customize_application.xml (95%) diff --git a/res/layout-large/tab_widget_indicator.xml b/res/layout-land/apps_customize_application.xml similarity index 55% rename from res/layout-large/tab_widget_indicator.xml rename to res/layout-land/apps_customize_application.xml index c09c8534c9..bface6b7de 100644 --- a/res/layout-large/tab_widget_indicator.xml +++ b/res/layout-land/apps_customize_application.xml @@ -1,5 +1,5 @@ - - + xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" + + style="@style/WorkspaceIcon.Landscape.AppsCustomize" + + android:id="@+id/application_icon" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:gravity="center_horizontal" + + launcher:blurColor="#FF6B8CF0" + launcher:outlineColor="#FF8CD2FF" + + android:focusable="true" + android:background="@drawable/focusable_view_bg" /> diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml index c120de8f9b..4aa487035c 100644 --- a/res/layout-land/launcher.xml +++ b/res/layout-land/launcher.xml @@ -31,7 +31,8 @@ android:fadeScrollbars="true" launcher:defaultScreen="2" launcher:cellCountX="4" - launcher:cellCountY="4"> + launcher:cellCountY="4" + launcher:pageSpacing="@dimen/workspace_page_spacing"> diff --git a/res/layout-large-port/workspace.xml b/res/layout-large-port/workspace.xml deleted file mode 100644 index ccd7d33127..0000000000 --- a/res/layout-large-port/workspace.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout-large-land/workspace.xml b/res/layout-large/workspace.xml similarity index 95% rename from res/layout-large-land/workspace.xml rename to res/layout-large/workspace.xml index e8ea782eec..abed5a8f54 100644 --- a/res/layout-large-land/workspace.xml +++ b/res/layout-large/workspace.xml @@ -21,7 +21,7 @@ android:paddingTop="?android:attr/actionBarSize" android:paddingBottom="10dp" launcher:defaultScreen="2" - launcher:pageSpacing="@dimen/workspace_page_spacing_land"> + launcher:pageSpacing="@dimen/workspace_page_spacing"> diff --git a/res/layout/apps_customize_application.xml b/res/layout-port/apps_customize_application.xml similarity index 95% rename from res/layout/apps_customize_application.xml rename to res/layout-port/apps_customize_application.xml index 37a8df7eea..37b41851f8 100644 --- a/res/layout/apps_customize_application.xml +++ b/res/layout-port/apps_customize_application.xml @@ -18,7 +18,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher" - style="@style/WorkspaceIcon.AppsCustomize" + style="@style/WorkspaceIcon.Portrait.AppsCustomize" android:id="@+id/application_icon" android:layout_width="match_parent" diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml index db074d7582..73051babc0 100644 --- a/res/layout-port/launcher.xml +++ b/res/layout-port/launcher.xml @@ -29,7 +29,8 @@ android:layout_height="match_parent" launcher:defaultScreen="2" launcher:cellCountX="4" - launcher:cellCountY="4"> + launcher:cellCountY="4" + launcher:pageSpacing="@dimen/workspace_page_spacing"> diff --git a/res/layout/apps_customize_pane.xml b/res/layout/apps_customize_pane.xml index 00c87cb093..adb0a6d357 100644 --- a/res/layout/apps_customize_pane.xml +++ b/res/layout/apps_customize_pane.xml @@ -25,7 +25,7 @@ + style="@style/TabIndicator.AppsCustomize" /> diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index 278da5419a..463cd17fab 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -24,21 +24,25 @@ @dimen/button_bar_height 0dp 0dp + 8dp 100dip 74dip 62dip - 6 - 3 - -1dp - -1dp - 5dp - 5dp - 5dp - 5dp - + 80dp + + 76dp + 6 + 3 + -1dp + -1dp + 5dp + 5dp + 5dp + 5dp + 42dp 30dp 5dp 3 diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml index 659947be24..e8d767ca8d 100644 --- a/res/values-land/styles.xml +++ b/res/values-land/styles.xml @@ -51,6 +51,11 @@ @dimen/toolbar_button_horizontal_padding + + - diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml index 945699bb1b..c5fdd68e0c 100644 --- a/res/values-port/dimens.xml +++ b/res/values-port/dimens.xml @@ -23,18 +23,19 @@ 64dp + 8dp 74dip 86dip - 4 - 5 - -1dp - -1dp - 15dp - 15dp - 5dp - 5dp + 4 + 5 + -1dp + -1dp + 15dp + 15dp + 5dp + 5dp 20dp 10dp diff --git a/res/values-xlarge-port/dimens.xml b/res/values-xlarge-port/dimens.xml index 31db0b3526..4f532805ae 100644 --- a/res/values-xlarge-port/dimens.xml +++ b/res/values-xlarge-port/dimens.xml @@ -22,5 +22,5 @@ - 36dp + 36dp \ No newline at end of file diff --git a/res/values/config.xml b/res/values/config.xml index 497011c3c9..f03ded71f3 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -1,6 +1,8 @@ true + + 45 150 200 diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 7353eda7d2..c04dd8e061 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -29,19 +29,17 @@ 12dip - + 56dp 56dp + 72dp - 72dp + 80dp 0dp 18dp 10dp 10dp 120px - - 56dp - 56dip diff --git a/res/values/styles.xml b/res/values/styles.xml index 06f6ed0f04..46e5f95a56 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -51,12 +51,6 @@ #B0000000 - - + - + + + +