Adding overview mode for reordering, widget adding and wallpaper switching

Change-Id: I082ba0b90ca4b3fbba32e8dfdec8ba79486d841c
diff --git a/res/layout-land/launcher.xml b/res/layout-land/launcher.xml
index 8ee1413..3454ad4 100644
--- a/res/layout-land/launcher.xml
+++ b/res/layout-land/launcher.xml
@@ -65,6 +65,10 @@
             android:id="@+id/qsb_bar"
             layout="@layout/qsb_bar" />
 
+        <include layout="@layout/overview_panel"
+            android:id="@+id/overview_panel"
+            android:visibility="gone" />
+
         <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
              that it is still visible during the transition to AllApps and doesn't overlay on
              top of that view. -->
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index 0fee045..a2e8298 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -30,16 +30,6 @@
         android:layout_height="match_parent"
         android:fitsSystemWindows="true">
 
-        <!-- Keep these behind the workspace so that they are not visible when
-             we go into AllApps -->
-        <include
-            android:id="@+id/page_indicator"
-            layout="@layout/page_indicator"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom|center_horizontal"
-            android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
-
         <!-- The workspace contains 5 screens of cells -->
         <com.android.launcher3.Workspace
             android:id="@+id/workspace"
@@ -65,6 +55,20 @@
             android:layout_height="@dimen/button_bar_height_plus_padding"
             android:layout_gravity="bottom" />
 
+        <include layout="@layout/overview_panel"
+            android:id="@+id/overview_panel"
+            android:visibility="gone" />
+
+        <!-- Keep these behind the workspace so that they are not visible when
+             we go into AllApps -->
+        <include
+            android:id="@+id/page_indicator"
+            layout="@layout/page_indicator"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom|center_horizontal"
+            android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
+
         <include
             android:id="@+id/qsb_bar"
             layout="@layout/qsb_bar" />
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 852d1ec..82f0178 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -30,16 +30,6 @@
         android:layout_height="match_parent"
         android:fitsSystemWindows="true">
 
-        <!-- Keep these behind the workspace so that they are not visible when
-             we go into AllApps -->
-        <include
-            android:id="@+id/page_indicator"
-            layout="@layout/page_indicator"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="bottom|center_horizontal"
-            android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
-
         <!-- The workspace contains 5 screens of cells -->
         <com.android.launcher3.Workspace
             android:id="@+id/workspace"
@@ -69,6 +59,20 @@
             android:id="@+id/qsb_bar"
             layout="@layout/qsb_bar" />
 
+        <include layout="@layout/overview_panel"
+            android:id="@+id/overview_panel"
+            android:visibility="gone" />
+
+        <!-- Keep these behind the workspace so that they are not visible when
+             we go into AllApps -->
+        <include
+            android:id="@+id/page_indicator"
+            layout="@layout/page_indicator"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="bottom|center_horizontal"
+            android:layout_marginBottom="@dimen/button_bar_height_plus_padding" />
+
         <!-- The Workspace cling must appear under the AppsCustomizePagedView below to ensure
              that it is still visible during the transition to AllApps and doesn't overlay on
              top of that view. -->
diff --git a/res/layout/overview_panel.xml b/res/layout/overview_panel.xml
new file mode 100644
index 0000000..713adea
--- /dev/null
+++ b/res/layout/overview_panel.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2013 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.
+-->
+<LinearLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="wrap_content"
+    android:layout_height="wrap_content"
+    android:orientation="horizontal"
+    android:layout_gravity="center_horizontal|bottom"
+    android:paddingBottom="@dimen/overview_panel_bottom_padding">
+
+    <TextView
+        android:id="@+id/widget_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/widget_button_text"
+        android:textSize="18dp"/>
+    <Space
+        android:layout_width="@dimen/overview_panel_buttonSpacing"
+        android:layout_height="wrap_content"/>
+    <TextView
+        android:id="@+id/wallpaper_button"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/wallpaper_button_text"
+        android:textSize="18dp" />
+</LinearLayout>
diff --git a/res/values/config.xml b/res/values/config.xml
index cc3d4f0..2fc3473 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -15,6 +15,8 @@
     <integer name="config_workspaceUnshrinkTime">300</integer>
     <!-- Out of 100, the percent to shrink the workspace during spring loaded mode. -->
     <integer name="config_workspaceSpringLoadShrinkPercentage">80</integer>
+    <!-- Out of 100, the percent to shrink the workspace during overview mode. -->
+    <integer name="config_workspaceOverviewShrinkPercentage">50</integer>
 
     <!-- Fade/zoom in/out duration & scale in the AllApps transition.
          Note: This should be less than the workspaceShrinkTime as they happen together. -->
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 2bfb31c..13a15e3 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -50,6 +50,8 @@
     <dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
     <dimen name="workspace_icon_text_size">12sp</dimen>
     <dimen name="workspace_spring_loaded_page_spacing">15dp</dimen>
+    <dimen name="overview_panel_bottom_padding">50dp</dimen>
+    <dimen name="overview_panel_buttonSpacing">40dp</dimen>
 
     <dimen name="app_icon_drawable_padding">6dp</dimen>
     <dimen name="app_icon_drawable_padding_land">2dp</dimen>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 052e13b..51da40b 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -282,4 +282,9 @@
     <!-- Debug-only activity name. [DO NOT TRANSLATE] -->
     <string name="debug_memory_activity">* HPROF</string>
 
+    <!-- Strings for the customization mode -->
+    <!-- Text for widget add button -->
+    <string name="widget_button_text">Add Widget</string>
+    <!-- Text for wallpaper change button -->
+    <string name="wallpaper_button_text">Wallpaper</string>
 </resources>