Merge "Adding the ability to scale the hotseat or items in the hotseat" into jb-mr1-dev
diff --git a/res/drawable-sw720dp-hdpi/workspace_bg.9.png b/res/drawable-sw720dp-hdpi/workspace_bg.9.png
new file mode 100644
index 0000000..5bbfa4f
--- /dev/null
+++ b/res/drawable-sw720dp-hdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-sw720dp-mdpi/workspace_bg.9.png b/res/drawable-sw720dp-mdpi/workspace_bg.9.png
new file mode 100644
index 0000000..2856e09
--- /dev/null
+++ b/res/drawable-sw720dp-mdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/drawable-sw720dp-xhdpi/workspace_bg.9.png b/res/drawable-sw720dp-xhdpi/workspace_bg.9.png
new file mode 100644
index 0000000..72269f2
--- /dev/null
+++ b/res/drawable-sw720dp-xhdpi/workspace_bg.9.png
Binary files differ
diff --git a/res/layout-sw720dp-port/workspace_cling.xml b/res/layout-sw720dp-port/workspace_cling.xml
deleted file mode 100644
index 29bea81..0000000
--- a/res/layout-sw720dp-port/workspace_cling.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2011 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.
--->
-<com.android.launcher2.Cling
- xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- launcher:drawIdentifier="workspace_large">
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/cling_text_block_offset_x"
- android:layout_marginTop="@dimen/cling_text_block_offset_y">
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
- <TextView
- style="@style/ClingTitleText"
- android:text="@string/workspace_cling_title" />
- <TextView
- style="@style/ClingText"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:text="@string/workspace_cling_move_item" />
- <Button
- style="@style/ClingButton"
- android:layout_marginTop="15dp"
- android:onClick="dismissWorkspaceCling" />
- </LinearLayout>
- </FrameLayout>
- <TextView
- style="@style/ClingText"
- android:layout_width="180dp"
- android:layout_height="wrap_content"
- android:layout_marginTop="15dp"
- android:layout_marginRight="150dp"
- android:layout_gravity="right"
- android:gravity="right"
- android:text="@string/workspace_cling_open_all_apps" />
-</com.android.launcher2.Cling>
diff --git a/res/layout-sw720dp/workspace_cling.xml b/res/layout-sw720dp/workspace_cling.xml
index fd7d4f8..10e6976 100644
--- a/res/layout-sw720dp/workspace_cling.xml
+++ b/res/layout-sw720dp/workspace_cling.xml
@@ -16,12 +16,13 @@
<com.android.launcher2.Cling
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
- launcher:drawIdentifier="workspace_large">
+ launcher:drawIdentifier="workspace_portrait">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_marginLeft="@dimen/cling_text_block_offset_x"
- android:layout_marginTop="@dimen/cling_text_block_offset_y">
+ android:layout_marginLeft="20dp"
+ android:layout_marginRight="20dp"
+ android:layout_marginTop="90dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -34,19 +35,22 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/workspace_cling_move_item" />
- <Button
- style="@style/ClingButton"
- android:layout_marginTop="15dp"
- android:onClick="dismissWorkspaceCling" />
</LinearLayout>
</FrameLayout>
<TextView
style="@style/ClingText"
- android:layout_width="180dp"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:layout_marginTop="90dp"
- android:layout_marginRight="130dp"
- android:layout_gravity="right"
- android:gravity="right"
+ android:layout_marginLeft="20dp"
+ android:layout_marginRight="20dp"
+ android:layout_marginBottom="130dp"
+ android:layout_gravity="bottom"
+ android:gravity="center"
android:text="@string/workspace_cling_open_all_apps" />
+ <Button
+ style="@style/ClingButton"
+ android:layout_marginBottom="15dp"
+ android:layout_marginRight="10dp"
+ android:layout_gravity="bottom|right"
+ android:onClick="dismissWorkspaceCling" />
</com.android.launcher2.Cling>
diff --git a/res/layout/user_folder.xml b/res/layout/user_folder.xml
index 208390d..af17250 100644
--- a/res/layout/user_folder.xml
+++ b/res/layout/user_folder.xml
@@ -26,10 +26,10 @@
android:id="@+id/folder_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:paddingLeft="0dip"
- android:paddingRight="0dip"
- android:paddingTop="0dip"
- android:paddingBottom="0dip"
+ android:paddingLeft="@dimen/folder_padding"
+ android:paddingRight="@dimen/folder_padding"
+ android:paddingTop="@dimen/folder_padding"
+ android:paddingBottom="@dimen/folder_padding"
android:cacheColorHint="#ff333333"
android:hapticFeedbackEnabled="false"
launcher:widthGap="@dimen/folder_width_gap"
diff --git a/res/values-sw600dp-land/config.xml b/res/values-sw600dp-land/config.xml
new file mode 100644
index 0000000..822ea89
--- /dev/null
+++ b/res/values-sw600dp-land/config.xml
@@ -0,0 +1,7 @@
+<resources>
+<!-- Folders -->
+ <!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
+ >= folder_max_num_items. When these are set to -1, they are automatically determined. -->
+ <integer name="folder_max_count_x">8</integer>
+ <integer name="folder_max_count_y">5</integer>
+</resources>
diff --git a/res/values-sw600dp/config.xml b/res/values-sw600dp/config.xml
index bda3c32..bbb22c5 100644
--- a/res/values-sw600dp/config.xml
+++ b/res/values-sw600dp/config.xml
@@ -11,9 +11,9 @@
<!-- Folders -->
<!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
>= folder_max_num_items. When these are set to -1, they are automatically determined. -->
- <integer name="folder_max_count_x">-1</integer>
- <integer name="folder_max_count_y">-1</integer>
- <integer name="folder_max_num_items">-1</integer>
+ <integer name="folder_max_count_x">6</integer>
+ <integer name="folder_max_count_y">6</integer>
+ <integer name="folder_max_num_items">36</integer>
<!-- Camera distance for the overscroll effect. We use a higher value here because the
workspace screens run nearly flush to the edge of the screen-->
diff --git a/res/values-sw600dp/dimens.xml b/res/values-sw600dp/dimens.xml
index bb6cbc9..bf19e5c 100644
--- a/res/values-sw600dp/dimens.xml
+++ b/res/values-sw600dp/dimens.xml
@@ -46,6 +46,9 @@
<dimen name="folder_preview_size">68dp</dimen>
<dimen name="folder_cell_width">86dp</dimen>
<dimen name="folder_cell_height">90dp</dimen>
+ <dimen name="folder_width_gap">3dp</dimen>
+ <dimen name="folder_height_gap">3dp</dimen>
+ <dimen name="folder_padding">6dp</dimen>
<dimen name="cell_layout_left_padding_port">12dp</dimen>
<dimen name="cell_layout_right_padding_port">12dp</dimen>
diff --git a/res/values-sw720dp/config.xml b/res/values-sw720dp/config.xml
index 1913d74..76d7da7 100644
--- a/res/values-sw720dp/config.xml
+++ b/res/values-sw720dp/config.xml
@@ -8,6 +8,13 @@
<!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
<integer name="config_workspaceSpringLoadShrinkPercentage">90</integer>
+<!-- Folders -->
+ <!-- Folder max bounds and max number of items. Note: folder_max_count_x * folder_max_count_y
+ >= folder_max_num_items. When these are set to -1, they are automatically determined. -->
+ <integer name="folder_max_count_x">-1</integer>
+ <integer name="folder_max_count_y">-1</integer>
+ <integer name="folder_max_num_items">-1</integer>
+
<!-- Workspace -->
<!-- Whether or not the drop targets drop down as opposed to fade in -->
<bool name="config_useDropTargetDownTransition">true</bool>
diff --git a/res/values-sw720dp/dimens.xml b/res/values-sw720dp/dimens.xml
index 9d73eca..54ac870 100644
--- a/res/values-sw720dp/dimens.xml
+++ b/res/values-sw720dp/dimens.xml
@@ -41,10 +41,6 @@
<!-- 44dp high for the optical bounds -->
<dimen name="search_bar_height">52dp</dimen>
- <dimen name="folder_cell_width">96dp</dimen>
- <dimen name="folder_cell_height">96dp</dimen>
- <dimen name="folder_preview_size">75dp</dimen>
-
<!-- AppsCustomize -->
<dimen name="apps_customize_cell_width">96dp</dimen>
<dimen name="apps_customize_cell_height">96dp</dimen>
@@ -71,6 +67,15 @@
<dimen name="cell_layout_bottom_padding_port">0dp</dimen>
<dimen name="cell_layout_bottom_padding_land">0dp</dimen>
+<!-- Folders -->
+ <!-- The size of the image which sits behind the preview of the folder contents -->
+ <dimen name="folder_cell_width">96dp</dimen>
+ <dimen name="folder_cell_height">96dp</dimen>
+ <dimen name="folder_preview_size">75dp</dimen>
+ <dimen name="folder_width_gap">2dp</dimen>
+ <dimen name="folder_height_gap">2dp</dimen>
+ <dimen name="folder_padding">4dp</dimen>
+
<!-- Workspace padding -->
<dimen name="workspace_left_padding_port">0dp</dimen>
<dimen name="workspace_left_padding_land">0dp</dimen>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index fb96c0d..d497c2d 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -120,6 +120,7 @@
<dimen name="folder_name_padding">10dp</dimen>
<dimen name="folder_width_gap">0dp</dimen>
<dimen name="folder_height_gap">0dp</dimen>
+ <dimen name="folder_padding">0dp</dimen>
<!-- CellLayout padding -->
<dimen name="cell_layout_left_padding_port">0dp</dimen>
diff --git a/src/com/android/launcher2/CellLayout.java b/src/com/android/launcher2/CellLayout.java
index c158f41..4f4ef4e 100644
--- a/src/com/android/launcher2/CellLayout.java
+++ b/src/com/android/launcher2/CellLayout.java
@@ -19,7 +19,6 @@
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
-import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
diff --git a/src/com/android/launcher2/DragLayer.java b/src/com/android/launcher2/DragLayer.java
index a2f2bcd..fed0ad9 100644
--- a/src/com/android/launcher2/DragLayer.java
+++ b/src/com/android/launcher2/DragLayer.java
@@ -705,13 +705,10 @@
@Override
protected int getChildDrawingOrder(int childCount, int i) {
- // We don't want to prioritize the workspace drawing on top of the other children in
- // landscape for the overscroll event.
- if (LauncherApplication.isScreenLandscape(getContext())) {
- return super.getChildDrawingOrder(childCount, i);
- }
-
- if (mWorkspaceIndex == -1 || mQsbIndex == -1 ||
+ // TODO: We have turned off this custom drawing order because it now effects touch
+ // dispatch order. We need to sort that issue out and then decide how to go about this.
+ if (true || LauncherApplication.isScreenLandscape(getContext()) ||
+ mWorkspaceIndex == -1 || mQsbIndex == -1 ||
mLauncher.getWorkspace().isDrawingBackgroundGradient()) {
return i;
}