summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-08-19 21:54:57 (GMT)
committerRajesh Yengisetty <rajesh@cyngn.com>2014-08-19 21:55:50 (GMT)
commitdbf12b7f65b4aa3e0a19a86ce3a90269c5a23df2 (patch)
tree38e4078252b15b64f4723838be21504d2ff5781b
parent64d9506ec221db6def2d9f67dfbd9b0e068f3f8c (diff)
downloadandroid_packages_apps_Trebuchet-dbf12b7f65b4aa3e0a19a86ce3a90269c5a23df2.zip
android_packages_apps_Trebuchet-dbf12b7f65b4aa3e0a19a86ce3a90269c5a23df2.tar.gz
android_packages_apps_Trebuchet-dbf12b7f65b4aa3e0a19a86ce3a90269c5a23df2.tar.bz2
Fix HideIcon behavior in Folders
https://jira.cyanogenmod.org/browse/CYAN-5022 Change-Id: I6da2e8ee4b3ab4fede10553a422f5520eb6e1293
-rw-r--r--src/com/android/launcher3/Folder.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/com/android/launcher3/Folder.java b/src/com/android/launcher3/Folder.java
index 004fa4e..54d2793 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -121,6 +121,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
RelativeLayout mFolderTitleSection;
private float mFolderIconPivotX;
private float mFolderIconPivotY;
+ private boolean mHideLabels;
private boolean mIsEditingName = false;
private InputMethodManager mInputMethodManager;
@@ -221,11 +222,11 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS | InputType.TYPE_TEXT_FLAG_CAP_WORDS);
mAutoScrollHelper = new FolderAutoScrollHelper(mScrollView);
- if (SettingsProvider.getBoolean(mLauncher,
+ mHideLabels = SettingsProvider.getBoolean(mLauncher,
SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS,
- R.bool.preferences_interface_homescreen_hide_icon_labels_default)) {
+ R.bool.preferences_interface_homescreen_hide_icon_labels_default);
+ if (mHideLabels) {
mFolderName.setVisibility(View.GONE);
- mFolderNameHeight = getPaddingBottom();
}
mFolderLock = (ImageView) findViewById(R.id.folder_lock);
@@ -350,11 +351,7 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
// Convert to a string here to ensure that no other state associated with the text field
// gets saved.
String newTitle = mFolderName.getText().toString();
- if (!SettingsProvider.getBoolean(mLauncher,
- SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS,
- R.bool.preferences_interface_homescreen_hide_icon_labels_default)) {
- mInfo.setTitle(newTitle);
- }
+ mInfo.setTitle(newTitle);
LauncherModel.updateItemInDatabase(mLauncher, mInfo);
if (commit) {
@@ -658,6 +655,10 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
textView.setOnClickListener(this);
textView.setOnLongClickListener(this);
+ if (mHideLabels) {
+ textView.setTextVisibility(!mHideLabels);
+ }
+
// We need to check here to verify that the given item's location isn't already occupied
// by another item.
if (mContent.getChildAt(item.cellX, item.cellY) != null || item.cellX < 0 || item.cellY < 0