diff options
author | Winson Chung <winsonc@google.com> | 2010-11-22 14:34:57 -0800 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2010-11-22 14:43:15 -0800 |
commit | d28ed49ea7fa54a16512c11c83ca8fec942b27af (patch) | |
tree | 055c6f4fefe473b4c041027d5ed71ebecc07977b /src/com/android/launcher2/CustomizePagedView.java | |
parent | 59fbda815e7b1c38f7aaf5d7eb87601f78e88c5b (diff) | |
download | android_packages_apps_Trebuchet-d28ed49ea7fa54a16512c11c83ca8fec942b27af.tar.gz android_packages_apps_Trebuchet-d28ed49ea7fa54a16512c11c83ca8fec942b27af.tar.bz2 android_packages_apps_Trebuchet-d28ed49ea7fa54a16512c11c83ca8fec942b27af.zip |
Fixing improper paging of wallpaper providers in customization drawer.
Change-Id: I3f0323f2e97d4538ae9c35e17738bcbb46b5a2a7
Diffstat (limited to 'src/com/android/launcher2/CustomizePagedView.java')
-rw-r--r-- | src/com/android/launcher2/CustomizePagedView.java | 5 |
1 files changed, 4 insertions, 1 deletions
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( |