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"
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(