summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaj Yengisetty <rajesh@cyngn.com>2014-11-10 18:35:02 (GMT)
committerAdnan <adnan@cyngn.com>2014-11-19 23:53:59 (GMT)
commit9243f35a56910d1a38a671619a220a2a24b3286e (patch)
treecc0a6701306341f3de3c48bf7c587bba7629fb01
parent67cbdb15c642198f1c54147b8ec7e38c8c8346ab (diff)
downloadandroid_packages_apps_Trebuchet-9243f35a56910d1a38a671619a220a2a24b3286e.zip
android_packages_apps_Trebuchet-9243f35a56910d1a38a671619a220a2a24b3286e.tar.gz
android_packages_apps_Trebuchet-9243f35a56910d1a38a671619a220a2a24b3286e.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 dc33552..7d3fcba 100644
--- a/src/com/android/launcher3/Folder.java
+++ b/src/com/android/launcher3/Folder.java
@@ -123,6 +123,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;
@@ -228,11 +229,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);
@@ -367,11 +368,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) {
@@ -741,6 +738,10 @@ public class Folder extends LinearLayout implements DragSource, View.OnClickList
textView.setOnLongClickListener(this);
textView.setOnFocusChangeListener(mFocusIndicatorHandler);
+ 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