Added FolderIconPreviewVerifier class.

This class verifies whether an item in a Foder is displayed in
the FolderIcon preview, based on the item's rank.

We use this class to determine which items in a Folder will be
displayed in the preview.

Bug: 35064148
Change-Id: Ia21bccbd95c348efeac62591ae3696a4c60b5339
This commit is contained in:
Jon Miranda
2017-02-07 11:40:22 -08:00
parent ea61fb24a6
commit 655ec42ce5
6 changed files with 139 additions and 58 deletions
@@ -98,10 +98,4 @@ public class StackFolderIconLayoutRule implements FolderIcon.PreviewLayoutRule {
public boolean clipToBackground() {
return false;
}
@Override
public List<View> getItemsToDisplay(Folder folder) {
List<View> items = folder.getItemsInReadingOrder();
return items.subList(0, Math.min(items.size(), MAX_NUM_ITEMS_IN_PREVIEW));
}
}