Add new motion for when Folder preview changes due to onDrop.

Instead of changing the display order of the Folder to preserve
the upper left quadrant, we are opting to change the Folder Icon
preview to always show the upper left quadrant.

This means that when adding items to a Folder, the preview items
may change. (They will change when the column size increases).

Bug: 27944225
Bug: 63140071
Change-Id: I863c2479469d68559cab2878030c2087d48217d6
This commit is contained in:
Jon Miranda
2017-07-13 17:54:54 -07:00
parent 5dcd5027ca
commit 4dd024b974
5 changed files with 200 additions and 26 deletions

View File

@@ -40,19 +40,14 @@ public class FolderIconPreviewVerifier {
}
public void setFolderInfo(FolderInfo info) {
FolderPagedView.calculateGridSize(info.contents.size(), 0, 0, mMaxGridCountX,
int numItemsInFolder = info.contents.size();
FolderPagedView.calculateGridSize(numItemsInFolder, 0, 0, mMaxGridCountX,
mMaxGridCountY, mMaxItemsPerPage, mGridSize);
mGridCountX = mGridSize[0];
int numItemsInFolder = info.contents.size();
mDisplayingUpperLeftQuadrant = FeatureFlags.LAUNCHER3_NEW_FOLDER_ANIMATION
&& !FeatureFlags.LAUNCHER3_LEGACY_FOLDER_ICON
&& numItemsInFolder > FolderIcon.NUM_ITEMS_IN_PREVIEW;
if (mDisplayingUpperLeftQuadrant) {
FolderPagedView.calculateGridSize(info.contents.size(), 0, 0, mMaxGridCountX,
mMaxGridCountY, mMaxItemsPerPage, mGridSize);
mGridCountX = mGridSize[0];
}
}
/**