merge in ics-release history after reset to master
diff --git a/res/layout-land/search_bar.xml b/res/layout-land/search_bar.xml
index a1c87e4..c606173f 100644
--- a/res/layout-land/search_bar.xml
+++ b/res/layout-land/search_bar.xml
@@ -20,14 +20,13 @@
     android:layout_width="@dimen/qsb_bar_height"
     android:layout_height="match_parent">
    <!-- Global search icon -->
-   <ImageView
+   <com.android.launcher2.HolographicImageView
         style="@style/SearchButton"
         android:id="@+id/search_button"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:src="@drawable/ic_home_search_normal_holo"
         android:adjustViewBounds="true"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickSearchButton"
         android:focusable="true"
         android:clickable="true"
@@ -42,14 +41,13 @@
         android:clickable="true" />
 
     <!-- Voice search icon -->
-    <ImageView
+    <com.android.launcher2.HolographicImageView
         style="@style/SearchButton"
         android:id="@+id/voice_button"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:src="@drawable/ic_home_voice_search_holo"
         android:adjustViewBounds="true"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickVoiceButton"
         android:focusable="true"
         android:clickable="true"
diff --git a/res/layout-port/search_bar.xml b/res/layout-port/search_bar.xml
index 6b2c827..5c20ec0 100644
--- a/res/layout-port/search_bar.xml
+++ b/res/layout-port/search_bar.xml
@@ -22,7 +22,7 @@
     android:layout_gravity="bottom|center_horizontal"
     android:background="@drawable/search_frame">
    <!-- Global search icon -->
-   <LinearLayout
+   <com.android.launcher2.HolographicLinearLayout
         style="@style/SearchButton"
         android:id="@+id/search_button_container"
         android:layout_width="match_parent"
@@ -30,7 +30,6 @@
         android:layout_alignParentLeft="true"
         android:layout_alignParentTop="true"
         android:layout_toLeftOf="@+id/voice_button_container"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickSearchButton"
         android:focusable="true"
         android:clickable="true"
@@ -41,10 +40,10 @@
             android:layout_height="match_parent"
             android:src="@drawable/ic_home_search_normal_holo"
             android:adjustViewBounds="true" />
-    </LinearLayout>
+    </com.android.launcher2.HolographicLinearLayout>
 
     <!-- Voice search icon -->
-    <LinearLayout
+    <com.android.launcher2.HolographicLinearLayout
         style="@style/SearchButton.Voice"
         android:id="@+id/voice_button_container"
         android:layout_width="@dimen/search_bar_height"
@@ -52,7 +51,6 @@
         android:layout_alignParentRight="true"
         android:layout_alignParentTop="true"
         android:gravity="right"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickVoiceButton"
         android:focusable="true"
         android:clickable="true"
@@ -63,5 +61,5 @@
             android:layout_height="match_parent"
             android:src="@drawable/ic_home_voice_search_holo"
             android:adjustViewBounds="true" />
-    </LinearLayout>
+    </com.android.launcher2.HolographicLinearLayout>
 </RelativeLayout>
diff --git a/res/layout-sw600dp/search_bar.xml b/res/layout-sw600dp/search_bar.xml
index f8b950c..d8975b4 100644
--- a/res/layout-sw600dp/search_bar.xml
+++ b/res/layout-sw600dp/search_bar.xml
@@ -20,7 +20,7 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent">
    <!-- Global search icon -->
-   <ImageView
+   <com.android.launcher2.HolographicImageView
         style="@style/SearchButton"
         android:id="@+id/search_button"
         android:layout_width="wrap_content"
@@ -28,7 +28,6 @@
         android:layout_alignParentLeft="true"
         android:layout_alignParentTop="true"
         android:src="@drawable/ic_home_search_normal_holo"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickSearchButton"
         android:focusable="true"
         android:clickable="true"
@@ -44,14 +43,13 @@
         android:clickable="true" />
 
     <!-- Voice search icon -->
-    <ImageView
+    <com.android.launcher2.HolographicImageView
         style="@style/SearchButton"
         android:id="@+id/voice_button"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:layout_toRightOf="@+id/search_divider"
         android:src="@drawable/ic_home_voice_search_holo"
-        android:background="?android:attr/selectableItemBackground"
         android:onClick="onClickVoiceButton"
         android:focusable="true"
         android:clickable="true"
diff --git a/res/layout/apps_customize_widget.xml b/res/layout/apps_customize_widget.xml
index 57a9962..7cc4177 100644
--- a/res/layout/apps_customize_widget.xml
+++ b/res/layout/apps_customize_widget.xml
@@ -45,12 +45,8 @@
             android:ellipsize="marquee"
             android:fadingEdge="horizontal"
 
-            android:textColor="#FFBBBBBB"
-            android:textSize="14sp"
-            android:shadowColor="#FF000000"
-            android:shadowDx="0.0"
-            android:shadowDy="1.0"
-            android:shadowRadius="1.0" />
+            android:textColor="#FFFFFFFF"
+            android:textSize="13sp" />
 
         <!-- The original dimensions of the widget (can't be the same text as above due to different
              style. -->
@@ -58,17 +54,13 @@
             android:id="@+id/widget_dims"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_gravity="bottom"
+            android:layout_gravity="center"
             android:layout_marginLeft="5dp"
             android:layout_weight="0"
             android:gravity="left"
 
-            android:textColor="#FF666666"
-            android:textSize="12sp"
-            android:shadowColor="#99000000"
-            android:shadowDx="0.0"
-            android:shadowDy="1.0"
-            android:shadowRadius="1.0" />
+            android:textColor="#FF555555"
+            android:textSize="12sp" />
     </LinearLayout>
 
     <!-- The icon of the widget. -->
@@ -77,6 +69,6 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:layout_weight="1"
-        android:adjustViewBounds="true"
-        android:scaleType="fitStart" />
+        android:padding="8dp"
+        android:scaleType="matrix" />
 </com.android.launcher2.PagedViewWidget>
diff --git a/res/values-port/dimens.xml b/res/values-port/dimens.xml
index 5aff6d9..83f2d60 100644
--- a/res/values-port/dimens.xml
+++ b/res/values-port/dimens.xml
@@ -24,6 +24,7 @@
     <dimen name="workspace_bottom_padding">0dp</dimen>
     <dimen name="workspace_page_spacing">-1dp</dimen>
 
+<!-- AppsCustomize -->
     <integer name="apps_customize_cellCountX">4</integer>
     <integer name="apps_customize_cellCountY">5</integer>
     <dimen name="apps_customize_pageLayoutWidthGap">-1dp</dimen>
diff --git a/res/values-sw340dp-port/dimens.xml b/res/values-sw340dp-port/dimens.xml
index 690facc..dd485e3 100644
--- a/res/values-sw340dp-port/dimens.xml
+++ b/res/values-sw340dp-port/dimens.xml
@@ -49,4 +49,12 @@
     <dimen name="button_bar_width_left_padding">8dp</dimen>
     <dimen name="button_bar_width_right_padding">8dp</dimen>
     <dimen name="button_bar_height_plus_padding">80dp</dimen>
+
+<!-- AppsCustomize -->
+    <dimen name="apps_customize_pageLayoutPaddingTop">16dp</dimen>
+    <dimen name="apps_customize_pageLayoutPaddingBottom">20dp</dimen>
+    <dimen name="apps_customize_pageLayoutPaddingLeft">8dp</dimen>
+    <dimen name="apps_customize_pageLayoutPaddingRight">8dp</dimen>
+    <dimen name="apps_customize_cell_height">92dp</dimen>
+    <dimen name="apps_customize_widget_cell_height_gap">16dp</dimen>
 </resources>
diff --git a/res/values-sw340dp-port/styles.xml b/res/values-sw340dp-port/styles.xml
index c006b85..2b1376d 100644
--- a/res/values-sw340dp-port/styles.xml
+++ b/res/values-sw340dp-port/styles.xml
@@ -32,4 +32,16 @@
         <item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item>
         <item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item>
     </style>
+
+<!-- AppsCustomize -->
+    <style name="WorkspaceIcon.Portrait.AppsCustomize">
+        <item name="android:singleLine">false</item>
+        <item name="android:maxLines">2</item>
+        <item name="android:background">@null</item>
+        <item name="android:paddingTop">4dp</item>
+        <item name="android:paddingBottom">0dp</item>
+        <item name="android:paddingLeft">0dp</item>
+        <item name="android:paddingRight">0dp</item>
+        <item name="android:drawablePadding">6dp</item>
+    </style>
 </resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 7973ca8..faad606 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -55,11 +55,11 @@
     <dimen name="apps_customize_tab_bar_height">56dp</dimen>
     <dimen name="app_icon_size">48dp</dimen>
     <!-- The width can be 72dp because we don't have L/R padding -->
-    <dimen name="apps_customize_cell_width">72dp</dimen>
-    <dimen name="apps_customize_cell_height">80dp</dimen>
+    <dimen name="apps_customize_cell_width">74dp</dimen>
+    <dimen name="apps_customize_cell_height">82dp</dimen>
     <dimen name="apps_customize_max_gap">18dp</dimen>
     <dimen name="apps_customize_widget_cell_width_gap">10dp</dimen>
-    <dimen name="apps_customize_widget_cell_height_gap">10dp</dimen>
+    <dimen name="apps_customize_widget_cell_height_gap">8dp</dimen>
     <dimen name="title_texture_width">120px</dimen>
 
     <!-- height of the bottom row of controls -->
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 05a83b2..8368388 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -95,12 +95,14 @@
     </style>
 
     <style name="WorkspaceIcon.Portrait.AppsCustomize">
+        <item name="android:singleLine">false</item>
+        <item name="android:maxLines">2</item>
         <item name="android:background">@null</item>
-        <item name="android:paddingTop">4dp</item>
+        <item name="android:paddingTop">0dp</item>
         <item name="android:paddingBottom">0dp</item>
         <item name="android:paddingLeft">0dp</item>
         <item name="android:paddingRight">0dp</item>
-        <item name="android:drawablePadding">8dp</item>
+        <item name="android:drawablePadding">2dp</item>
     </style>
     <style name="WorkspaceIcon.Landscape.AppsCustomize">
         <item name="android:background">@null</item>
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index ca4d614..32b1787 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -31,10 +31,11 @@
 import android.content.res.Resources;
 import android.content.res.TypedArray;
 import android.graphics.Bitmap;
+import android.graphics.Bitmap.Config;
 import android.graphics.Canvas;
 import android.graphics.PorterDuff;
 import android.graphics.Rect;
-import android.graphics.Bitmap.Config;
+import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
 import android.os.AsyncTask;
 import android.os.Process;
@@ -46,7 +47,6 @@
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.animation.AccelerateInterpolator;
-import android.view.animation.DecelerateInterpolator;
 import android.widget.GridLayout;
 import android.widget.ImageView;
 import android.widget.Toast;
@@ -277,7 +277,7 @@
     @Override
     protected void init() {
         super.init();
-        mCenterPagesVertically = false;
+        mCenterPagesVertically = true;
 
         Context context = getContext();
         Resources r = context.getResources();
@@ -531,8 +531,11 @@
         // Compose the drag image
         Bitmap b;
         Drawable preview = image.getDrawable();
-        int w = preview.getIntrinsicWidth();
-        int h = preview.getIntrinsicHeight();
+        RectF mTmpScaleRect = new RectF(0f,0f,1f,1f);
+        image.getImageMatrix().mapRect(mTmpScaleRect);
+        float scale = mTmpScaleRect.right;
+        int w = (int) (preview.getIntrinsicWidth() * scale);
+        int h = (int) (preview.getIntrinsicHeight() * scale);
         if (createItemInfo instanceof PendingAddWidgetInfo) {
             PendingAddWidgetInfo createWidgetInfo = (PendingAddWidgetInfo) createItemInfo;
             int[] spanXY = mLauncher.getSpanForWidget(createWidgetInfo, null);
@@ -540,7 +543,7 @@
             createItemInfo.spanY = spanXY[1];
 
             b = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888);
-            renderDrawableToBitmap(preview, b, 0, 0, w, h, 1, 1, mDragViewMultiplyColor);
+            renderDrawableToBitmap(preview, b, 0, 0, w, h, scale, mDragViewMultiplyColor);
         } else {
             // Workaround for the fact that we don't keep the original ResolveInfo associated with
             // the shortcut around.  To get the icon, we just render the preview image (which has
@@ -891,15 +894,18 @@
         layout.setMinimumWidth(getPageContentWidth());
         layout.measure(widthSpec, heightSpec);
     }
-    private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h,
-            float scaleX, float scaleY) {
-        renderDrawableToBitmap(d, bitmap, x, y, w, h, scaleX, scaleY, 0xFFFFFFFF);
+    private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h) {
+        renderDrawableToBitmap(d, bitmap, x, y, w, h, 1f, 0xFFFFFFFF);
     }
     private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h,
-            float scaleX, float scaleY, int multiplyColor) {
+            float scale) {
+        renderDrawableToBitmap(d, bitmap, x, y, w, h, scale, 0xFFFFFFFF);
+    }
+    private void renderDrawableToBitmap(Drawable d, Bitmap bitmap, int x, int y, int w, int h,
+            float scale, int multiplyColor) {
         if (bitmap != null) {
             Canvas c = new Canvas(bitmap);
-            c.scale(scaleX, scaleY);
+            c.scale(scale, scale);
             Rect oldBounds = d.copyBounds();
             d.setBounds(x, y, x + w, y + h);
             d.draw(c);
@@ -911,26 +917,20 @@
         }
     }
     private Bitmap getShortcutPreview(ResolveInfo info, int cellWidth, int cellHeight) {
+        // Render the background
+        int offset = (int) (mAppIconSize * sWidgetPreviewIconPaddingPercentage);
+        int bitmapSize = mAppIconSize + 2 * offset;
+        Bitmap preview = Bitmap.createBitmap(bitmapSize, bitmapSize, Config.ARGB_8888);
+        renderDrawableToBitmap(mDefaultWidgetBackground, preview, 0, 0, bitmapSize, bitmapSize);
+
         // Render the icon
-        Bitmap preview = Bitmap.createBitmap(cellWidth, mAppIconSize, Config.ARGB_8888);
         Drawable icon = mIconCache.getFullResIcon(info, mPackageManager);
-        renderDrawableToBitmap(icon, preview, 0, 0, mAppIconSize, mAppIconSize, 1f, 1f);
+        renderDrawableToBitmap(icon, preview, offset, offset, mAppIconSize, mAppIconSize);
         return preview;
     }
     private Bitmap getWidgetPreview(AppWidgetProviderInfo info,
             int cellHSpan, int cellVSpan, int cellWidth, int cellHeight) {
 
-        // Calculate the size of the drawable
-        cellHSpan = Math.max(mMinWidgetSpan, Math.min(mMaxWidgetSpan, cellHSpan));
-        cellVSpan = Math.max(mMinWidgetSpan, Math.min(mMaxWidgetSpan, cellVSpan));
-        int expectedWidth = mWidgetSpacingLayout.estimateCellWidth(cellHSpan);
-        int expectedHeight = mWidgetSpacingLayout.estimateCellHeight(cellVSpan);
-
-        // Scale down the bitmap to fit the space
-        float widgetPreviewScale = (float) cellWidth / expectedWidth;
-        expectedWidth = (int) (widgetPreviewScale * expectedWidth);
-        expectedHeight = (int) (widgetPreviewScale * expectedHeight);
-
         // Load the preview image if possible
         String packageName = info.provider.getPackageName();
         Drawable drawable = null;
@@ -941,49 +941,59 @@
                 Log.w(LOG_TAG, "Can't load icon drawable 0x" + Integer.toHexString(info.icon)
                         + " for provider: " + info.provider);
             } else {
-                // Scale down the preview to the dimensions we want
+                // Scale down the preview to something that is closer to the cellWidth/Height
                 int imageWidth = drawable.getIntrinsicWidth();
                 int imageHeight = drawable.getIntrinsicHeight();
-                float aspect = (float) imageWidth / imageHeight;
-                int newWidth = imageWidth;
-                int newHeight = imageHeight;
-                if (aspect > 1f) {
-                    newWidth = expectedWidth;
-                    newHeight = (int) (imageHeight * ((float) expectedWidth / imageWidth));
+                int bitmapWidth = imageWidth;
+                int bitmapHeight = imageHeight;
+                if (imageWidth > imageHeight) {
+                    bitmapWidth = cellWidth;
+                    bitmapHeight = (int) (imageHeight * ((float) bitmapWidth / imageWidth));
                 } else {
-                    newHeight = expectedHeight;
-                    newWidth = (int) (imageWidth * ((float) expectedHeight / imageHeight));
+                    bitmapHeight = cellHeight;
+                    bitmapWidth = (int) (imageWidth * ((float) bitmapHeight / imageHeight));
                 }
 
-                preview = Bitmap.createBitmap(newWidth, newHeight, Config.ARGB_8888);
-                renderDrawableToBitmap(drawable, preview, 0, 0, newWidth, newHeight, 1f, 1f);
+                preview = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Config.ARGB_8888);
+                renderDrawableToBitmap(drawable, preview, 0, 0, bitmapWidth, bitmapHeight);
             }
         }
 
         // Generate a preview image if we couldn't load one
         if (drawable == null) {
             Resources resources = mLauncher.getResources();
-            int bitmapWidth;
-            int bitmapHeight;
+            // TODO: This actually uses the apps customize cell layout params, where as we make want
+            // the Workspace params for more accuracy.
+            int targetWidth = mWidgetSpacingLayout.estimateCellWidth(cellHSpan);
+            int targetHeight = mWidgetSpacingLayout.estimateCellHeight(cellVSpan);
+            int bitmapWidth = targetWidth;
+            int bitmapHeight = targetHeight;
+            int offset = (int) (mAppIconSize * sWidgetPreviewIconPaddingPercentage);
+            float iconScale = 1f;
 
-            // Specify the dimensions of the bitmap (since we are using a default preview bg with 
-            // the full icon, we only imply the aspect ratio of the widget)
+            // Determine the size of the bitmap we want to draw
             if (cellHSpan == cellVSpan) {
-                bitmapWidth = bitmapHeight = cellWidth;
-                expectedWidth = expectedHeight = mWidgetPreviewIconPaddedDimension;
-            } else if (cellHSpan >= cellVSpan) {
-                bitmapWidth = expectedWidth = cellWidth;
-                bitmapHeight = expectedHeight = mWidgetPreviewIconPaddedDimension;
+                // For square widgets, we just have a fixed size for 1x1 and larger-than-1x1
+                if (cellHSpan <= 1) {
+                    bitmapWidth = bitmapHeight = mAppIconSize + 2 * offset;
+                } else {
+                    bitmapWidth = bitmapHeight = mAppIconSize + 4 * offset;
+                }
             } else {
-                // Note that in vertical widgets, we might not have enough space due to the text
-                // label, so be conservative and use the width as a height bound
-                bitmapWidth = expectedWidth = mWidgetPreviewIconPaddedDimension;
-                bitmapHeight = expectedHeight = cellWidth;
+                // Otherwise, ensure that we are properly sized within the cellWidth/Height
+                if (targetWidth > targetHeight) {
+                    bitmapWidth = Math.min(targetWidth, cellWidth);
+                    bitmapHeight = (int) (targetHeight * ((float) bitmapWidth / targetWidth));
+                    iconScale = Math.min((float) bitmapHeight / (mAppIconSize + 2 * offset), 1f);
+                } else {
+                    bitmapHeight = Math.min(targetHeight, cellHeight);
+                    bitmapWidth = (int) (targetWidth * ((float) bitmapHeight / targetHeight));
+                    iconScale = Math.min((float) bitmapWidth / (mAppIconSize + 2 * offset), 1f);
+                }
             }
-
             preview = Bitmap.createBitmap(bitmapWidth, bitmapHeight, Config.ARGB_8888);
-            renderDrawableToBitmap(mDefaultWidgetBackground, preview, 0, 0, expectedWidth,
-                    expectedHeight, 1f, 1f);
+            renderDrawableToBitmap(mDefaultWidgetBackground, preview, 0, 0, bitmapWidth,
+                    bitmapWidth);
 
             // Draw the icon in the top left corner
             try {
@@ -991,9 +1001,9 @@
                 if (info.icon > 0) icon = mPackageManager.getDrawable(packageName, info.icon, null);
                 if (icon == null) icon = resources.getDrawable(R.drawable.ic_launcher_application);
 
-                int offset = (int) (mAppIconSize * sWidgetPreviewIconPaddingPercentage);
-                renderDrawableToBitmap(icon, preview, offset, offset,
-                        mAppIconSize, mAppIconSize, 1f, 1f);
+                renderDrawableToBitmap(icon, preview, (int) (offset * iconScale),
+                        (int) (offset * iconScale), (int) (mAppIconSize * iconScale),
+                        (int) (mAppIconSize * iconScale));
             } catch (Resources.NotFoundException e) {}
         }
         return preview;
@@ -1007,7 +1017,8 @@
             PagedViewGridLayout layout = new PagedViewGridLayout(context, mWidgetCountX,
                     mWidgetCountY);
             setupPage(layout);
-            addView(layout);
+            addView(layout, new PagedViewGridLayout.LayoutParams(LayoutParams.MATCH_PARENT,
+                    LayoutParams.MATCH_PARENT));
         }
     }
     public void syncWidgetPageItems(int page, boolean immediate) {
@@ -1126,7 +1137,12 @@
         for (int i = 0; i < count; ++i) {
             PagedViewWidget widget = (PagedViewWidget) layout.getChildAt(i);
             if (widget != null) {
-                widget.applyPreview(new FastBitmapDrawable(data.generatedImages.get(i)), i);
+                Bitmap preview = data.generatedImages.get(i);
+                boolean scale =
+                    (preview.getWidth() >= data.cellWidth ||
+                     preview.getHeight() >= data.cellHeight);
+
+                widget.applyPreview(new FastBitmapDrawable(preview), i, scale);
             }
         }
         layout.createHardwareLayer();
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index 51fdc2e..49c47ce 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -90,10 +90,8 @@
         mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
         mPaint.setColor(bubbleColor);
         mBubbleColorAlpha = Color.alpha(bubbleColor) / 255.0f;
-        mFocusedOutlineColor = res.getColor(android.R.color.holo_blue_light);
-        mFocusedGlowColor = res.getColor(android.R.color.holo_blue_light);
-        mPressedOutlineColor = res.getColor(android.R.color.holo_blue_light);
-        mPressedGlowColor = res.getColor(android.R.color.holo_blue_light);
+        mFocusedOutlineColor = mFocusedGlowColor = mPressedOutlineColor = mPressedGlowColor =
+            res.getColor(android.R.color.holo_blue_light);
 
         setShadowLayer(SHADOW_LARGE_RADIUS, 0.0f, SHADOW_Y_OFFSET, SHADOW_LARGE_COLOUR);
     }
diff --git a/src/com/android/launcher2/HolographicImageView.java b/src/com/android/launcher2/HolographicImageView.java
new file mode 100644
index 0000000..1d34cd6
--- /dev/null
+++ b/src/com/android/launcher2/HolographicImageView.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+package com.android.launcher2;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.util.AttributeSet;
+import android.widget.ImageView;
+
+public class HolographicImageView extends ImageView {
+
+    private final HolographicViewHelper mHolographicHelper;
+
+    public HolographicImageView(Context context) {
+        this(context, null);
+    }
+
+    public HolographicImageView(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public HolographicImageView(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+
+        mHolographicHelper = new HolographicViewHelper(context);
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+
+        // One time call to generate the pressed/focused state -- must be called after
+        // measure/layout
+        mHolographicHelper.generatePressedFocusedStates(this);
+    }
+}
diff --git a/src/com/android/launcher2/HolographicLinearLayout.java b/src/com/android/launcher2/HolographicLinearLayout.java
new file mode 100644
index 0000000..986a063
--- /dev/null
+++ b/src/com/android/launcher2/HolographicLinearLayout.java
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package com.android.launcher2;
+
+import android.content.Context;
+import android.graphics.Canvas;
+import android.util.AttributeSet;
+import android.widget.LinearLayout;
+
+public class HolographicLinearLayout extends LinearLayout {
+
+    private final HolographicViewHelper mHolographicHelper;
+
+    public HolographicLinearLayout(Context context) {
+        this(context, null);
+    }
+
+    public HolographicLinearLayout(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public HolographicLinearLayout(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+
+        setWillNotDraw(false);
+        mHolographicHelper = new HolographicViewHelper(context);
+    }
+
+    @Override
+    protected void onDraw(Canvas canvas) {
+        super.onDraw(canvas);
+
+        // One time call to generate the pressed/focused state -- must be called after
+        // measure/layout
+        mHolographicHelper.generatePressedFocusedStates(this);
+    }
+}
diff --git a/src/com/android/launcher2/HolographicViewHelper.java b/src/com/android/launcher2/HolographicViewHelper.java
new file mode 100644
index 0000000..c68a5ea
--- /dev/null
+++ b/src/com/android/launcher2/HolographicViewHelper.java
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ */
+
+package com.android.launcher2;
+
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.StateListDrawable;
+import android.view.View;
+
+public class HolographicViewHelper {
+
+    private final HolographicOutlineHelper mOutlineHelper = new HolographicOutlineHelper();
+    private final Canvas mTempCanvas = new Canvas();
+
+    private boolean mStatesUpdated;
+    private int mHighlightColor;
+
+    public HolographicViewHelper(Context context) {
+        Resources res = context.getResources();
+        mHighlightColor = res.getColor(android.R.color.holo_blue_light);
+    }
+
+    /**
+     * Generate the pressed/focused states if necessary.
+     */
+    void generatePressedFocusedStates(View v) {
+        if (!mStatesUpdated) {
+            mStatesUpdated = true;
+            Bitmap outline = createGlowingOutline(v, mTempCanvas, mHighlightColor, mHighlightColor);
+            FastBitmapDrawable d = new FastBitmapDrawable(outline);
+
+            StateListDrawable states = new StateListDrawable();
+            states.addState(new int[] {android.R.attr.state_pressed}, d);
+            states.addState(new int[] {android.R.attr.state_focused}, d);
+            v.setBackgroundDrawable(states);
+        }
+    }
+
+    /**
+     * Returns a new bitmap to be used as the object outline, e.g. to visualize the drop location.
+     * Responsibility for the bitmap is transferred to the caller.
+     */
+    private Bitmap createGlowingOutline(View v, Canvas canvas, int outlineColor, int glowColor) {
+        final int padding = HolographicOutlineHelper.MAX_OUTER_BLUR_RADIUS;
+        final Bitmap b = Bitmap.createBitmap(
+                v.getWidth() + padding, v.getHeight() + padding, Bitmap.Config.ARGB_8888);
+
+        canvas.setBitmap(b);
+        canvas.save();
+            v.draw(canvas);
+        canvas.restore();
+        mOutlineHelper.applyOuterBlur(b, canvas, outlineColor);
+        canvas.setBitmap(null);
+
+        return b;
+    }
+}
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 6d95555..8aa57bb 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -559,6 +559,7 @@
         if (!mWorkspaceLoading) {
             mWorkspace.post(mBuildLayersRunnable);
         }
+        clearTypedText();
     }
 
     @Override
@@ -1302,7 +1303,6 @@
         if (initialQuery == null) {
             // Use any text typed in the launcher as the initial query
             initialQuery = getTypedText();
-            clearTypedText();
         }
         if (appSearchData == null) {
             appSearchData = new Bundle();
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 5e87b46..2ef7e29 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -367,7 +367,7 @@
     }
 
     /**
-     * Estimates the width that the number of vSpan cells will take up.
+     * Estimates the width that the number of hSpan cells will take up.
      */
     public int estimateCellWidth(int hSpan) {
         // TODO: we need to take widthGap into effect
diff --git a/src/com/android/launcher2/PagedViewWidget.java b/src/com/android/launcher2/PagedViewWidget.java
index adf94ab..4d5fd7b 100644
--- a/src/com/android/launcher2/PagedViewWidget.java
+++ b/src/com/android/launcher2/PagedViewWidget.java
@@ -22,23 +22,13 @@
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.content.res.Resources;
-import android.content.res.TypedArray;
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
-import android.graphics.Color;
 import android.graphics.Paint;
-import android.graphics.PorterDuff;
-import android.graphics.PorterDuff.Mode;
-import android.graphics.PorterDuffXfermode;
-import android.graphics.Rect;
 import android.graphics.RectF;
-import android.os.Handler;
-import android.os.HandlerThread;
-import android.os.Message;
 import android.util.AttributeSet;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
-import android.view.View;
 import android.widget.Checkable;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
@@ -145,10 +135,11 @@
         }
     }
 
-    void applyPreview(FastBitmapDrawable preview, int index) {
+    void applyPreview(FastBitmapDrawable preview, int index, boolean scale) {
         final ImageView image = (ImageView) findViewById(R.id.widget_preview);
         if (preview != null) {
             image.setImageDrawable(preview);
+            image.setScaleType(scale ? ImageView.ScaleType.FIT_START : ImageView.ScaleType.MATRIX);
             image.setAlpha(0f);
             image.animate()
                  .alpha(1f)