OSDN Git Service

Minor fix to figuring out rows/columns for Customize mode
authorMichael Jurka <mikejurka@google.com>
Wed, 18 May 2011 22:31:55 +0000 (15:31 -0700)
committerMichael Jurka <mikejurka@google.com>
Fri, 20 May 2011 22:10:12 +0000 (15:10 -0700)
DO NOT MERGE

Change-Id: I53d2ec46061f07f175a8f5aefff8dafd1b786a7f

src/com/android/launcher2/CustomizePagedView.java

index cf1aa6b..8d867b6 100644 (file)
@@ -176,12 +176,6 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
         setDragSlopeThreshold(
                 r.getInteger(R.integer.config_customizationDrawerDragSlopeThreshold) / 100.0f);
 
-        // Create a dummy page and set it up to find out the content width (used by our parent)
-        PagedViewCellLayout layout = new PagedViewCellLayout(getContext());
-        setupPage(layout);
-        mPageContentWidth = layout.getContentWidth();
-        mMinPageWidth = layout.getWidthBeforeFirstLayout();
-
         setVisibility(View.GONE);
         setSoundEffectsEnabled(false);
         setupWorkspaceLayout();
@@ -215,6 +209,7 @@ public class CustomizePagedView extends PagedViewWithDraggableItems
             PagedViewCellLayout layout = new PagedViewCellLayout(getContext());
             setupPage(layout);
             mPageContentWidth = layout.getContentWidth();
+            mMinPageWidth = layout.getWidthBeforeFirstLayout();
         }
     }