summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout-xlarge-port/customization_drawer.xml4
-rw-r--r--src/com/android/launcher2/CustomizePagedView.java5
2 files changed, 6 insertions, 3 deletions
diff --git a/res/layout-xlarge-port/customization_drawer.xml b/res/layout-xlarge-port/customization_drawer.xml
index a9e1c0df3..d90f3ca98 100644
--- a/res/layout-xlarge-port/customization_drawer.xml
+++ b/res/layout-xlarge-port/customization_drawer.xml
@@ -19,8 +19,8 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
- launcher:wallpaperCellSpanX="4"
- launcher:widgetCellCountX="10"
+ launcher:wallpaperCellSpanX="3"
+ launcher:widgetCellCountX="9"
launcher:cellCountX="5"
launcher:cellCountY="3"
launcher:pageLayoutWidthGap="36dp"
diff --git a/src/com/android/launcher2/CustomizePagedView.java b/src/com/android/launcher2/CustomizePagedView.java
index 92140b1d9..6db6aa9a9 100644
--- a/src/com/android/launcher2/CustomizePagedView.java
+++ b/src/com/android/launcher2/CustomizePagedView.java
@@ -768,7 +768,10 @@ public class CustomizePagedView extends PagedView
LinearLayout layout = (LinearLayout) getChildAt(page);
layout.removeAllViews();
final int count = mWallpaperList.size();
- for (int i = 0; i < count; ++i) {
+ final int numItemsPerPage = mMaxWidgetsCellHSpan / mWallpaperCellHSpan;
+ final int startIndex = page * numItemsPerPage;
+ final int endIndex = Math.min(count, startIndex + numItemsPerPage);
+ for (int i = startIndex; i < endIndex; ++i) {
final ResolveInfo info = mWallpaperList.get(i);
LinearLayout l = (LinearLayout) mInflater.inflate(