diff options
Diffstat (limited to 'src/com/cyanogenmod')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/FolderIcon.java | 4 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Launcher.java | 10 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 43 |
3 files changed, 36 insertions, 21 deletions
diff --git a/src/com/cyanogenmod/trebuchet/FolderIcon.java b/src/com/cyanogenmod/trebuchet/FolderIcon.java index 4df83b02f..556b47fd6 100644 --- a/src/com/cyanogenmod/trebuchet/FolderIcon.java +++ b/src/com/cyanogenmod/trebuchet/FolderIcon.java @@ -130,9 +130,7 @@ public class FolderIcon extends LinearLayout implements FolderListener { FolderIcon icon = (FolderIcon) LayoutInflater.from(launcher).inflate(resId, group, false); icon.mFolderName = (BubbleTextView) icon.findViewById(R.id.folder_icon_name); - if (!PreferencesProvider.Interface.Homescreen.getHideIconLabels(launcher)) { - icon.mFolderName.setText(folderInfo.title); - } + icon.mFolderName.setText(folderInfo.title); icon.mPreviewBackground = (ImageView) icon.findViewById(R.id.preview_background); icon.setTag(folderInfo); diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java index c59b6bee1..3ac78c2c3 100644 --- a/src/com/cyanogenmod/trebuchet/Launcher.java +++ b/src/com/cyanogenmod/trebuchet/Launcher.java @@ -980,8 +980,8 @@ public final class Launcher extends Activity View createShortcut(int layoutResId, ViewGroup parent, ShortcutInfo info) { BubbleTextView favorite = (BubbleTextView) mInflater.inflate(layoutResId, parent, false); favorite.applyFromShortcutInfo(info, mIconCache); - if (mHideIconLabels){ - favorite.setText(null); + if (mHideIconLabels) { + favorite.setTextVisible(false); } favorite.setOnClickListener(this); return favorite; @@ -1741,6 +1741,9 @@ public final class Launcher extends Activity // Create the view FolderIcon newFolder = FolderIcon.fromXml(R.layout.folder_icon, this, layout, folderInfo, mIconCache); + if (mHideIconLabels) { + newFolder.setTextVisible(false); + } mWorkspace.addInScreen(newFolder, container, screen, cellX, cellY, 1, 1, isWorkspaceLocked()); return newFolder; @@ -3320,6 +3323,9 @@ public final class Launcher extends Activity FolderIcon newFolder = FolderIcon.fromXml(R.layout.folder_icon, this, (ViewGroup) workspace.getChildAt(workspace.getCurrentPage()), (FolderInfo) item, mIconCache); + if (!mHideIconLabels) { + newFolder.setTextVisible(false); + } workspace.addInScreen(newFolder, item.container, item.screen, item.cellX, item.cellY, 1, 1, false); break; diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 2aeb17417..2ae8f32e0 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -263,6 +263,7 @@ public class Workspace extends SmoothPagedView private int mDefaultHomescreen; private boolean mShowSearchBar; private boolean mResizeAnyWidget; + private boolean mHideIconLabels; private boolean mScrollWallpaper; private boolean mShowScrollingIndicator; private boolean mFadeScrollingIndicator; @@ -341,6 +342,7 @@ public class Workspace extends SmoothPagedView } mShowSearchBar = PreferencesProvider.Interface.Homescreen.getShowSearchBar(context); mResizeAnyWidget = PreferencesProvider.Interface.Homescreen.getResizeAnyWidget(context); + mHideIconLabels = PreferencesProvider.Interface.Homescreen.getHideIconLabels(context); mScrollWallpaper = PreferencesProvider.Interface.Homescreen.Scrolling.getScrollWallpaper(context); mShowScrollingIndicator = PreferencesProvider.Interface.Homescreen.Indicator.getShowScrollingIndicator(context); mFadeScrollingIndicator = PreferencesProvider.Interface.Homescreen.Indicator.getFadeScrollingIndicator(context); @@ -587,11 +589,13 @@ public class Workspace extends SmoothPagedView layout = mLauncher.getHotseat().getLayout(); child.setOnKeyListener(null); - // Hide folder title in the hotseat - if (child instanceof FolderIcon) { - ((FolderIcon) child).setTextVisible(false); - } else if (child instanceof BubbleTextView) { - ((BubbleTextView) child).setTextVisible(false); + if (!mHideIconLabels) { + // Hide titles in the hotseat + if (child instanceof FolderIcon) { + ((FolderIcon) child).setTextVisible(false); + } else if (child instanceof BubbleTextView) { + ((BubbleTextView) child).setTextVisible(false); + } } if (screen < 0) { @@ -603,11 +607,13 @@ public class Workspace extends SmoothPagedView y = mLauncher.getHotseat().getCellYFromOrder(screen); } } else { - // Show folder title if not in the hotseat - if (child instanceof FolderIcon) { - ((FolderIcon) child).setTextVisible(true); - } else if (child instanceof BubbleTextView) { - ((BubbleTextView) child).setTextVisible(true); + if (!mHideIconLabels) { + // Show titles if not in the hotseat + if (child instanceof FolderIcon) { + ((FolderIcon) child).setTextVisible(true); + } else if (child instanceof BubbleTextView) { + ((BubbleTextView) child).setTextVisible(true); + } } layout = (CellLayout) getChildAt(screen); @@ -1846,11 +1852,13 @@ public class Workspace extends SmoothPagedView d.draw(destCanvas); } else { if (v instanceof FolderIcon) { - // For FolderIcons the text can bleed into the icon area, and so we need to - // hide the text completely (which can't be achieved by clipping). - if (((FolderIcon) v).getTextVisible()) { - ((FolderIcon) v).setTextVisible(false); - textVisible = true; + if (!mHideIconLabels) { + // For FolderIcons the text can bleed into the icon area, and so we need to + // hide the text completely (which can't be achieved by clipping). + if (((FolderIcon) v).getTextVisible()) { + ((FolderIcon) v).setTextVisible(false); + textVisible = true; + } } } else if (v instanceof BubbleTextView) { final BubbleTextView tv = (BubbleTextView) v; @@ -1866,7 +1874,7 @@ public class Workspace extends SmoothPagedView v.draw(destCanvas); // Restore text visibility of FolderIcon if necessary - if (textVisible) { + if (!mHideIconLabels && textVisible) { ((FolderIcon) v).setTextVisible(true); } } @@ -3181,6 +3189,9 @@ public class Workspace extends SmoothPagedView case LauncherSettings.Favorites.ITEM_TYPE_FOLDER: view = FolderIcon.fromXml(R.layout.folder_icon, mLauncher, cellLayout, (FolderInfo) info, mIconCache); + if (mHideIconLabels) { + ((FolderIcon) view).setTextVisible(false); + } break; default: throw new IllegalStateException("Unknown item type: " + info.itemType); |