summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/folder
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/launcher3/folder')
-rw-r--r--src/com/android/launcher3/folder/Folder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index 9e3055036..5794004b9 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -356,13 +356,14 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
@Override
public boolean onBackKey() {
- mFolderName.setHint(sHintText);
// Convert to a string here to ensure that no other state associated with the text field
// gets saved.
String newTitle = mFolderName.getText().toString();
mInfo.setTitle(newTitle);
mLauncher.getModelWriter().updateItemInDatabase(mInfo);
+ mFolderName.setHint(sDefaultFolderName.contentEquals(newTitle) ? sHintText : null);
+
Utilities.sendCustomAccessibilityEvent(
this, AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED,
getContext().getString(R.string.folder_renamed, newTitle));
@@ -459,8 +460,10 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
if (!sDefaultFolderName.contentEquals(mInfo.title)) {
mFolderName.setText(mInfo.title);
+ mFolderName.setHint(null);
} else {
mFolderName.setText("");
+ mFolderName.setHint(sHintText);
}
// In case any children didn't come across during loading, clean up the folder accordingly