summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Folder.java
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2015-09-14 21:47:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-09-14 21:47:02 +0000
commit00e827c70cb4213ee05140157006a37d12662448 (patch)
tree791e8a024420d9fc398174c0a56fc1722d4c771c /src/com/android/launcher3/Folder.java
parentc0d915deae318c4c30a55e001b01619203ad677d (diff)
parent5fcaab43e603ceabd1d71ec355c8a0b59aac8cf0 (diff)
downloadandroid_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.tar.gz
android_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.tar.bz2
android_packages_apps_Trebuchet-00e827c70cb4213ee05140157006a37d12662448.zip
am 5fcaab43: am ea9ad5ce: Merge remote-tracking branch \'origin/ub-launcher3-burnaby\' into mnc-dev
* commit '5fcaab43e603ceabd1d71ec355c8a0b59aac8cf0': (76 commits) Restoring provider behavior for reloading app on old devices > For older devices, launcher will only reload in case of inserts with specific query parameters > For older devices, launcehr will notify content observers of any internal inserts > Chaning TAG for Launcher provider as max logging tag is only 23 characters Removing items which are on invalid screen Preventing null pointer crash when opening a folder Revert workaround for move to default screen on home intent. Fixing NPE in recycler view scroll bar. Adding workaround for regression caused by ag/752175 Adding gradle script for Android Studio Override the overscroll color for the widget rows. Adding graphic for all apps empty search screen. Using GET_UNINSTALLED_PACKAGES flag when getting packageInfo for a managed profile app Revert "Adding viewId for the QSB" Adding viewId for the QSB Fixing issue with missing scroll bar after fast-scrolling and searching. Fixing an issue where you would inadvertently start fastscrolling. Pending bind callbacks should be cleared before starting the loader, similar to startBinding Fixing widgets container inactive scroll bar color. Making the detached scrollbar catch up faster to the actual scroll position. Updating theme to use the light theme by default, instead of wallpaper theme > This allows us to use all the goodness of material theme > Cursor in folder edit text is no longer 1px wide Updating the target sdk to launcher Using the usermanager api to get creation time ...
Diffstat (limited to 'src/com/android/launcher3/Folder.java')
-rw-r--r--src/com/android/launcher3/Folder.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 2e19f6eba..c1aa35669 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
@@ -275,7 +282,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);
}
@@ -446,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();
@@ -561,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));
@@ -1389,7 +1396,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<ItemInfo> ITEM_POS_COMPARATOR = new Comparator<ItemInfo>() {
+ public static final Comparator<ItemInfo> ITEM_POS_COMPARATOR = new Comparator<ItemInfo>() {
@Override
public int compare(ItemInfo lhs, ItemInfo rhs) {