From 4b825dcd5f64a5ebb60271844fbc5257374422bc Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Sun, 19 Jun 2011 12:41:22 -0700 Subject: Tweaking launcher grid and spacing. Change-Id: I369a87f473d1e870b2f819221f6383aab340b067 --- res/layout-land/folder_icon.xml | 2 +- res/layout-land/workspace_screen.xml | 30 ----- res/layout-large-land/workspace_screen.xml | 33 ----- res/layout-large-port/workspace_screen.xml | 33 ----- .../all_apps_paged_view_application.xml | 2 +- res/layout-large/workspace_screen.xml | 33 +++++ res/layout-port/folder_icon.xml | 2 +- res/layout-port/workspace_screen.xml | 30 ----- res/layout/apps_customize_application.xml | 2 +- res/layout/user_folder.xml | 12 +- res/layout/workspace_screen.xml | 33 +++++ res/values-land/dimens.xml | 13 +- res/values-large-land/dimens.xml | 12 +- res/values-large-port/dimens.xml | 9 ++ res/values-large/dimens.xml | 28 ++--- res/values-large/styles.xml | 48 ++++++-- res/values-port/dimens.xml | 15 ++- res/values/attrs.xml | 11 +- res/values/dimens.xml | 18 +-- res/values/styles.xml | 38 +++--- .../android/launcher2/AppWidgetResizeFrame.java | 4 +- src/com/android/launcher2/CellLayout.java | 133 +++++++++------------ src/com/android/launcher2/Launcher.java | 10 +- src/com/android/launcher2/Utilities.java | 4 +- src/com/android/launcher2/Workspace.java | 8 +- 25 files changed, 262 insertions(+), 301 deletions(-) delete mode 100644 res/layout-land/workspace_screen.xml delete mode 100644 res/layout-large-land/workspace_screen.xml delete mode 100644 res/layout-large-port/workspace_screen.xml create mode 100644 res/layout-large/workspace_screen.xml delete mode 100644 res/layout-port/workspace_screen.xml create mode 100644 res/layout/workspace_screen.xml diff --git a/res/layout-land/folder_icon.xml b/res/layout-land/folder_icon.xml index 60569c5..e9d2b96 100644 --- a/res/layout-land/folder_icon.xml +++ b/res/layout-land/folder_icon.xml @@ -28,5 +28,5 @@ android:src="@drawable/portal_ring_inner_holo"/> + style="@style/WorkspaceIcon.Landscape.Folder"/> diff --git a/res/layout-land/workspace_screen.xml b/res/layout-land/workspace_screen.xml deleted file mode 100644 index a9faf89..0000000 --- a/res/layout-land/workspace_screen.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - diff --git a/res/layout-large-land/workspace_screen.xml b/res/layout-large-land/workspace_screen.xml deleted file mode 100644 index 25b05e9..0000000 --- a/res/layout-large-land/workspace_screen.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/res/layout-large-port/workspace_screen.xml b/res/layout-large-port/workspace_screen.xml deleted file mode 100644 index e33c612..0000000 --- a/res/layout-large-port/workspace_screen.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - diff --git a/res/layout-large/all_apps_paged_view_application.xml b/res/layout-large/all_apps_paged_view_application.xml index 16e5d82..019f75f 100644 --- a/res/layout-large/all_apps_paged_view_application.xml +++ b/res/layout-large/all_apps_paged_view_application.xml @@ -21,7 +21,7 @@ launcher:blurColor="#FF6B8CF0" launcher:outlineColor="#FF8CD2FF" - style="@style/WorkspaceIcon.AllApps" + style="@style/WorkspaceIcon.AppsCustomize" android:id="@+id/application_icon" android:layout_width="match_parent" diff --git a/res/layout-large/workspace_screen.xml b/res/layout-large/workspace_screen.xml new file mode 100644 index 0000000..52f9def --- /dev/null +++ b/res/layout-large/workspace_screen.xml @@ -0,0 +1,33 @@ + + + + diff --git a/res/layout-port/folder_icon.xml b/res/layout-port/folder_icon.xml index 3f776de..adc0e6a 100644 --- a/res/layout-port/folder_icon.xml +++ b/res/layout-port/folder_icon.xml @@ -28,5 +28,5 @@ android:src="@drawable/portal_ring_inner_holo"/> + style="@style/WorkspaceIcon.Portrait.Folder"/> diff --git a/res/layout-port/workspace_screen.xml b/res/layout-port/workspace_screen.xml deleted file mode 100644 index 7a6714f..0000000 --- a/res/layout-port/workspace_screen.xml +++ /dev/null @@ -1,30 +0,0 @@ - - - - diff --git a/res/layout/apps_customize_application.xml b/res/layout/apps_customize_application.xml index 4f36326..37a8df7 100644 --- a/res/layout/apps_customize_application.xml +++ b/res/layout/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.AllApps" + style="@style/WorkspaceIcon.AppsCustomize" android:id="@+id/application_icon" android:layout_width="match_parent" diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml index 06d79ef..299095d 100644 --- a/res/layout/user_folder.xml +++ b/res/layout/user_folder.xml @@ -30,16 +30,16 @@ android:id="@+id/folder_content" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:paddingLeft="0dip" + android:paddingRight="0dip" + android:paddingTop="8dip" + android:paddingBottom="8dip" android:cacheColorHint="#ff333333" android:hapticFeedbackEnabled="false" launcher:widthGap="@dimen/folder_width_gap" launcher:heightGap="@dimen/folder_height_gap" launcher:cellWidth="@dimen/workspace_cell_width" - launcher:cellHeight="@dimen/workspace_cell_height" - launcher:xAxisStartPadding="0dip" - launcher:xAxisEndPadding="0dip" - launcher:yAxisStartPadding="8dip" - launcher:yAxisEndPadding="8dip"/> + launcher:cellHeight="@dimen/workspace_cell_height" /> - \ No newline at end of file + diff --git a/res/layout/workspace_screen.xml b/res/layout/workspace_screen.xml new file mode 100644 index 0000000..ede0d99 --- /dev/null +++ b/res/layout/workspace_screen.xml @@ -0,0 +1,33 @@ + + + + diff --git a/res/values-land/dimens.xml b/res/values-land/dimens.xml index 13519e5..6ba7f7d 100644 --- a/res/values-land/dimens.xml +++ b/res/values-land/dimens.xml @@ -19,8 +19,12 @@ 12dip 12dip - 106dip - 74dip + + @dimen/qsb_bar_height + @dimen/button_bar_height + 0dp + 0dp + 100dip 74dip 62dip @@ -29,11 +33,12 @@ 3 10dp 5dp - 10dp - 10dp + 4dp + 4dp 2dp 2dp + 30dp 0dp 3 diff --git a/res/values-large-land/dimens.xml b/res/values-large-land/dimens.xml index eeb16f4..8a5dfd3 100644 --- a/res/values-large-land/dimens.xml +++ b/res/values-large-land/dimens.xml @@ -15,12 +15,20 @@ --> + + 25dip + 25dip + 15dip + 15dip + 32dp + 2dp + 100dip - 36dp - 6dp + 28dp + 8dp 20dp 14dp 40dp diff --git a/res/values-large-port/dimens.xml b/res/values-large-port/dimens.xml index 86bd03d..ba60e73 100644 --- a/res/values-large-port/dimens.xml +++ b/res/values-large-port/dimens.xml @@ -15,6 +15,7 @@ --> + 96dp 96dp 12dp + 40dp + 15dip + 15dip + 25dip + 25dip + 0dp + 32dp + 24dp 36dp 25dp diff --git a/res/values-large/dimens.xml b/res/values-large/dimens.xml index eb48859..9d4b3d9 100644 --- a/res/values-large/dimens.xml +++ b/res/values-large/dimens.xml @@ -18,6 +18,13 @@ 56dp + 96dip + 96dip + + 50dp + 64dp + + 96dp 96dp - 32dp - 2dp - 0dp - 32dp - - 50dp - 64dp - 10dp diff --git a/res/values-large/styles.xml b/res/values-large/styles.xml index f44bfa5..386e9ca 100644 --- a/res/values-large/styles.xml +++ b/res/values-large/styles.xml @@ -18,6 +18,42 @@ --> + + + + + + + - - - - - + + +