diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 93aa109..6b7aa98 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -66,27 +66,6 @@
         ApplicationCustomization
     }
 
-    /**
-     * The linear layout used strictly for the widget tab of the customization tray
-     */
-    private class WidgetLayout extends LinearLayout {
-        public WidgetLayout(Context context) {
-            super(context);
-        }
-
-        @Override
-        public boolean onTouchEvent(MotionEvent event) {
-            // We eat up the touch events here, since the PagedView (which uses the same swiping
-            // touch code as Workspace previously) uses onInterceptTouchEvent() to determine when
-            // the user is scrolling between pages.  This means that if the pages themselves don't
-            // handle touch events, it gets forwarded up to PagedView itself, and it's own
-            // onTouchEvent() handling will prevent further intercept touch events from being called
-            // (it's the same view in that case).  This is not ideal, but to prevent more changes,
-            // we just always mark the touch event as handled.
-            return super.onTouchEvent(event) || true;
-        }
-    }
-
     private static final String TAG = "CustomizeWorkspace";
     private static final boolean DEBUG = false;
 
@@ -593,7 +572,7 @@
         removeAllViews();
         int numPages = relayoutWidgets();
         for (int i = 0; i < numPages; ++i) {
-            LinearLayout layout = new WidgetLayout(getContext());
+            LinearLayout layout = new PagedViewWidgetLayout(getContext());
             layout.setGravity(Gravity.CENTER_HORIZONTAL);
 
             // Temporary change to prevent the last page from being too small (and items bleeding
diff --git a/src/com/android/launcher2/PagedViewWidgetLayout.java b/src/com/android/launcher2/PagedViewWidgetLayout.java
new file mode 100644
index 0000000..4666873
--- /dev/null
+++ b/src/com/android/launcher2/PagedViewWidgetLayout.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 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.util.AttributeSet;
+import android.view.MotionEvent;
+import android.widget.LinearLayout;
+
+/**
+ * The linear layout used strictly for the widget tab of the customization tray
+ */
+public class PagedViewWidgetLayout extends LinearLayout {
+    static final String TAG = "PagedViewWidgetLayout";
+
+    public PagedViewWidgetLayout(Context context) {
+        this(context, null);
+    }
+
+    public PagedViewWidgetLayout(Context context, AttributeSet attrs) {
+        this(context, attrs, 0);
+    }
+
+    public PagedViewWidgetLayout(Context context, AttributeSet attrs, int defStyle) {
+        super(context, attrs, defStyle);
+    }
+
+    @Override
+    public boolean onTouchEvent(MotionEvent event) {
+        // We eat up the touch events here, since the PagedView (which uses the same swiping
+        // touch code as Workspace previously) uses onInterceptTouchEvent() to determine when
+        // the user is scrolling between pages.  This means that if the pages themselves don't
+        // handle touch events, it gets forwarded up to PagedView itself, and it's own
+        // onTouchEvent() handling will prevent further intercept touch events from being called
+        // (it's the same view in that case).  This is not ideal, but to prevent more changes,
+        // we just always mark the touch event as handled.
+        return super.onTouchEvent(event) || true;
+    }
+
+    @Override
+    protected boolean onSetAlpha(int alpha) {
+        return true;
+    }
+
+    @Override
+    public void setAlpha(float alpha) {
+        setChildrenAlpha(alpha);
+        super.setAlpha(alpha);
+    }
+
+    private void setChildrenAlpha(float alpha) {
+        final int childCount = getChildCount();
+        for (int i = 0; i < childCount; i++) {
+            getChildAt(i).setAlpha(alpha);
+        }
+    }
+}
