summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/folder/FolderIconPreviewVerifier.java
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2017-07-13 17:54:54 -0700
committerJon Miranda <jonmiranda@google.com>2017-07-14 14:27:44 -0700
commit4dd024b974e208fa2a75fba365ecfa0ca9270221 (patch)
tree848bf8f4b9e607e82824e59cec8c47c6e083fcfa /src/com/android/launcher3/folder/FolderIconPreviewVerifier.java
parent5dcd5027ca867f1556ea36d7cae6c4b78814e24d (diff)
downloadandroid_packages_apps_Trebuchet-4dd024b974e208fa2a75fba365ecfa0ca9270221.tar.gz
android_packages_apps_Trebuchet-4dd024b974e208fa2a75fba365ecfa0ca9270221.tar.bz2
android_packages_apps_Trebuchet-4dd024b974e208fa2a75fba365ecfa0ca9270221.zip
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
Diffstat (limited to 'src/com/android/launcher3/folder/FolderIconPreviewVerifier.java')
-rw-r--r--src/com/android/launcher3/folder/FolderIconPreviewVerifier.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/com/android/launcher3/folder/FolderIconPreviewVerifier.java b/src/com/android/launcher3/folder/FolderIconPreviewVerifier.java
index 11c10783c..d054a5d42 100644
--- a/src/com/android/launcher3/folder/FolderIconPreviewVerifier.java
+++ b/src/com/android/launcher3/folder/FolderIconPreviewVerifier.java
@@ -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];
- }
}
/**