From 317698bd012c1930b83bb4e2e47ac9e363fa6c6a Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Wed, 29 Jul 2015 11:45:41 -0700 Subject: Loading high resolution icons for first 3 items in a folder > Sometimes a folder gets rearranged, without updating the model, like when an app in uninstalled. In that case, we need to update the icons for folder items, which were previously hidden Bug: 22813360 Change-Id: I99754911c969bf2153efb2948c226c1c69219b88 --- src/com/android/launcher3/Folder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android/launcher3/Folder.java') diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 2e19f6eba..f4fffbe3e 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -1389,7 +1389,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList } // Compares item position based on rank and position giving priority to the rank. - private static final Comparator ITEM_POS_COMPARATOR = new Comparator() { + public static final Comparator ITEM_POS_COMPARATOR = new Comparator() { @Override public int compare(ItemInfo lhs, ItemInfo rhs) { -- cgit v1.2.3 From 006ee269ba2e9946a83b42f96d4a0296254cba4a Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 3 Aug 2015 14:40:11 -0700 Subject: Refactoring search bar animations. - This refactoring ensures that LauncherStateTransition does not do its own animation on the QSB, and that all animations to the SearchDropTargetBar go through its own animators. Bug: 22515084 Change-Id: Ia7d13c44d861eac7517076b52a9651a90911ed0a --- src/com/android/launcher3/Folder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/com/android/launcher3/Folder.java') diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 2e19f6eba..535d1a443 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -275,7 +275,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList @Override public void enableAccessibleDrag(boolean enable) { - mLauncher.getSearchBar().enableAccessibleDrag(enable); + mLauncher.getSearchDropTargetBar().enableAccessibleDrag(enable); for (int i = 0; i < mContent.getChildCount(); i++) { mContent.getPageAt(i).enableAccessibleDrag(enable, CellLayout.FOLDER_ACCESSIBILITY_DRAG); } -- cgit v1.2.3 From 97b0d08d92c64034ba03ae8da5a8531edbd60d52 Mon Sep 17 00:00:00 2001 From: Winson Date: Thu, 13 Aug 2015 15:18:25 -0700 Subject: Refactoring to ExtendedEditText. --- src/com/android/launcher3/Folder.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/com/android/launcher3/Folder.java') diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 5e713b21f..7b88a8865 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -124,7 +124,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList @Thunk FolderPagedView mContent; @Thunk View mContentWrapper; - FolderEditText mFolderName; + ExtendedEditText mFolderName; private View mFooter; private int mFooterHeight; @@ -196,8 +196,15 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList mContent = (FolderPagedView) findViewById(R.id.folder_content); mContent.setFolder(this); - mFolderName = (FolderEditText) findViewById(R.id.folder_name); - mFolderName.setFolder(this); + mFolderName = (ExtendedEditText) findViewById(R.id.folder_name); + mFolderName.setOnBackKeyListener(new ExtendedEditText.OnBackKeyListener() { + @Override + public boolean onBackKey() { + // Close the activity on back key press + doneEditingFolderName(true); + return false; + } + }); mFolderName.setOnFocusChangeListener(this); // We disable action mode for now since it messes up the view on phones -- cgit v1.2.3 From 9fc953b94dbc6b99e6de08c9dcc80a0cb8e3e319 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Mon, 17 Aug 2015 12:24:25 -0700 Subject: Version code cleanup > Renaming Lmp to Lollipop > Lollipop_MR1 instead of directly using 22 > Using M APIs directly instead of reflection Change-Id: I10a307f46e3be15b3299f549a2fd7e0e215a6a1b --- src/com/android/launcher3/Folder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/com/android/launcher3/Folder.java') diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java index 7b88a8865..c1aa35669 100644 --- a/src/com/android/launcher3/Folder.java +++ b/src/com/android/launcher3/Folder.java @@ -453,7 +453,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList Animator openFolderAnim = null; final Runnable onCompleteRunnable; - if (!Utilities.isLmpOrAbove()) { + if (!Utilities.ATLEAST_LOLLIPOP) { positionAndSizeAsIcon(); centerAboutIcon(); @@ -568,7 +568,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList public void onAnimationEnd(Animator animation) { mFolderName.animate().setDuration(FOLDER_NAME_ANIMATION_DURATION) .translationX(0) - .setInterpolator(Utilities.isLmpOrAbove() ? + .setInterpolator(Utilities.ATLEAST_LOLLIPOP ? AnimationUtils.loadInterpolator(mLauncher, android.R.interpolator.fast_out_slow_in) : new LogDecelerateInterpolator(100, 0)); -- cgit v1.2.3