diff --git a/res/values-xlarge-port/styles.xml b/res/values-xlarge-port/styles.xml
new file mode 100644
index 0000000..2c5f5bb
--- /dev/null
+++ b/res/values-xlarge-port/styles.xml
@@ -0,0 +1,25 @@
+<?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.
+*/
+-->
+
+<resources>
+    <style name="CustomizeTabIndicator.Wide" parent="TabIndicator.Wide">
+        <item name="android:paddingLeft">20dp</item>
+        <item name="android:paddingRight">20dp</item>
+    </style>
+</resources>
diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index fd5979f..36ff8e1 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -174,7 +174,9 @@
 
         availableHeight -= mPageLayoutPaddingTop + mPageLayoutPaddingBottom;
         availableHeight -= cellHeight; // Assume at least one row
-        availableHeight -= screenHeight * 0.16f;
+        Resources r = getContext().getResources();
+        float scaleFactor = r.getInteger(R.integer.config_allAppsZoomScaleFactor) / 100f;
+        availableHeight -= screenHeight * scaleFactor;
         if (availableHeight > 0) {
             return Math.min(mMaxCellCountY,
                     1 + availableHeight / (cellHeight + mPageLayoutHeightGap));
diff --git a/src/com/android/launcher2/CustomizeTrayTabHost.java b/src/com/android/launcher2/CustomizeTrayTabHost.java
index e1ba700..c261bfb 100644
--- a/src/com/android/launcher2/CustomizeTrayTabHost.java
+++ b/src/com/android/launcher2/CustomizeTrayTabHost.java
@@ -81,7 +81,7 @@
                 .setIndicator(tabView).setContent(contentFactory));
         tabView = (TextView) mInflater.inflate(
                 R.layout.customize_tab_widget_indicator, tabWidget, false);
-        tabView.setText(mContext.getString(R.string.applications_tab_label));
+        tabView.setText(mContext.getString(R.string.all_apps_tab_apps));
         addTab(newTabSpec(APPLICATIONS_TAG)
                 .setIndicator(tabView).setContent(contentFactory));
         tabView = (TextView) mInflater.inflate(
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 1ba5c05..d715ee3 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -189,8 +189,6 @@
     }
 
     protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
-        // TODO: currently ignoring padding
-
         int widthSpecMode = MeasureSpec.getMode(widthMeasureSpec);
         int widthSpecSize = MeasureSpec.getSize(widthMeasureSpec);
 
@@ -233,10 +231,8 @@
             widthGap = heightGap = minGap;
         }
 
-        int newWidth = mPaddingLeft + mPaddingRight + (mCellCountX * cellWidth) +
-            ((mCellCountX - 1) * widthGap);
-        int newHeight = mPaddingTop + mPaddingBottom + (mCellCountY * cellHeight) +
-            ((mCellCountY - 1) * heightGap);
+        int newWidth = (mCellCountX * cellWidth) + ((mCellCountX - 1) * widthGap);
+        int newHeight = (mCellCountY * cellHeight) + ((mCellCountY - 1) * heightGap);
 
         final int count = getChildCount();
         for (int i = 0; i < count; i++) {
@@ -248,7 +244,8 @@
             child.measure(childWidthMeasureSpec, childheightMeasureSpec);
         }
 
-        setMeasuredDimension(newWidth, newHeight);
+        setMeasuredDimension(newWidth + mPaddingLeft + mPaddingRight,
+            newHeight + mPaddingTop + mPaddingBottom);
     }
 
     int getContentWidth() {
@@ -278,7 +275,8 @@
         int count = getChildCount();
         for (int i = 0; i < count; i++) {
             View child = getChildAt(i);
-            child.layout(0, 0, r - l, b - t);
+            child.layout(mPaddingLeft, mPaddingTop,
+                r - l - mPaddingRight, b - t - mPaddingBottom);
         }
     }
 
diff --git a/src/com/android/launcher2/PagedViewCellLayoutChildren.java b/src/com/android/launcher2/PagedViewCellLayoutChildren.java
index 92ff461..0907c60 100644
--- a/src/com/android/launcher2/PagedViewCellLayoutChildren.java
+++ b/src/com/android/launcher2/PagedViewCellLayoutChildren.java
@@ -92,8 +92,8 @@
             PagedViewCellLayout.LayoutParams lp =
                 (PagedViewCellLayout.LayoutParams) child.getLayoutParams();
             lp.setup(mCellWidth, mCellHeight, mWidthGap, mHeightGap,
-                    ((ViewGroup)getParent()).getPaddingLeft(),
-                    ((ViewGroup)getParent()).getPaddingTop());
+                    getPaddingLeft(),
+                    getPaddingTop());
 
             int childWidthMeasureSpec = MeasureSpec.makeMeasureSpec(lp.width,
                     MeasureSpec.EXACTLY);
@@ -111,18 +111,21 @@
         int count = getChildCount();
 
         int offsetX = 0;
-        if (mCenterContent) {
+        if (mCenterContent && count > 0) {
             // determine the max width of all the rows and center accordingly
-            int maxRowWidth = 0;
+            int maxRowX = 0;
+            int minRowX = Integer.MAX_VALUE;
             for (int i = 0; i < count; i++) {
                 View child = getChildAt(i);
                 if (child.getVisibility() != GONE) {
                     PagedViewCellLayout.LayoutParams lp =
                         (PagedViewCellLayout.LayoutParams) child.getLayoutParams();
-                    maxRowWidth = Math.max(maxRowWidth, lp.x + lp.width);
+                    minRowX = Math.min(minRowX, lp.x);
+                    maxRowX = Math.max(maxRowX, lp.x + lp.width);
                 }
             }
-            offsetX = (getMeasuredWidth() / 2) - (maxRowWidth / 2);
+            int maxRowWidth = maxRowX - minRowX;
+            offsetX = (getMeasuredWidth() - maxRowWidth) / 2;
         }
 
         for (int i = 0; i < count; i++) {
