Fix index out of bounds

Change-Id: Id288c01ab7e39fb16e7247030dbb76183436cb79
This commit is contained in:
Adam Cohen
2011-05-18 17:14:15 -07:00
parent 7c6932140d
commit 4dbe6d9934
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -219,6 +219,7 @@ public class Folder extends LinearLayout implements DragSource, OnItemLongClickL
ShortcutInfo child = (ShortcutInfo) children.get(i);
createAndAddShortcut(child);
}
mItemsInvalidated = true;
mInfo.addListener(this);
}
+1 -1
View File
@@ -270,7 +270,7 @@ public class FolderIcon extends FrameLayout implements DropTarget, FolderListene
ArrayList<View> items = mFolder.getItemsInReadingOrder();
int firstItemIndex = Math.max(0, items.size() - NUM_ITEMS_IN_PREVIEW);
for (int i = firstItemIndex; i < mFolder.getItemCount(); i++) {
for (int i = firstItemIndex; i < items.size(); i++) {
v = (TextView) items.get(i);
d = v.getCompoundDrawables()[1];