From 7459f1c6b504d936d41aa30bb25dc4ec585acd50 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Tue, 15 May 2012 11:26:28 -0400 Subject: [PATCH 1/5] Issue 1911: Permit folder names to wrap on multiple lines in folder list view so users can see the entire name. Reduce the default font size used in folder list view to a reasonable size so that long folder paths wrap to fewer lines. --- res/layout/folder_list_item.xml | 2 -- src/com/fsck/k9/FontSizes.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/res/layout/folder_list_item.xml b/res/layout/folder_list_item.xml index 1050de2a9..8cd6d580d 100644 --- a/res/layout/folder_list_item.xml +++ b/res/layout/folder_list_item.xml @@ -33,8 +33,6 @@ android:id="@+id/folder_name" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:singleLine="true" - android:ellipsize="start" android:textColor="?android:attr/textColorPrimary" android:textAppearance="?android:attr/textAppearanceLarge" /> diff --git a/src/com/fsck/k9/FontSizes.java b/src/com/fsck/k9/FontSizes.java index 5a1ae2a41..b48474d5c 100644 --- a/src/com/fsck/k9/FontSizes.java +++ b/src/com/fsck/k9/FontSizes.java @@ -136,7 +136,7 @@ public class FontSizes { accountName = MEDIUM; accountDescription = SMALL; - folderName = LARGE; + folderName = FONT_16SP; folderStatus = SMALL; messageListSubject = FONT_16SP; From 26fe9b7757880e190fc0639f921abde4ccd0d984 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Mon, 26 Nov 2012 17:50:43 -0500 Subject: [PATCH 2/5] Create new preference option for wrapping folder names in folder list view. Revert to using an ellipsized folder name as the default. --- res/layout/folder_list_item.xml | 2 ++ res/values/strings.xml | 3 +++ res/xml/global_preferences.xml | 12 ++++++++++++ src/com/fsck/k9/K9.java | 10 ++++++++++ src/com/fsck/k9/activity/FolderList.java | 4 ++++ src/com/fsck/k9/activity/setup/Prefs.java | 6 ++++++ src/com/fsck/k9/preferences/GlobalSettings.java | 3 +++ 7 files changed, 40 insertions(+) diff --git a/res/layout/folder_list_item.xml b/res/layout/folder_list_item.xml index 8cd6d580d..1050de2a9 100644 --- a/res/layout/folder_list_item.xml +++ b/res/layout/folder_list_item.xml @@ -33,6 +33,8 @@ android:id="@+id/folder_name" android:layout_width="fill_parent" android:layout_height="wrap_content" + android:singleLine="true" + android:ellipsize="start" android:textColor="?android:attr/textColorPrimary" android:textAppearance="?android:attr/textAppearanceLarge" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index 44e80e7ad..5339db35f 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -322,6 +322,8 @@ Please submit bug reports, contribute new features and ask questions at Colorize contacts Don\'t colorize names in your contact list Colorize names in your contact list + Wrap folder names + Show complete folder name wrapped on multiple lines rather than a partial name on a single line Fixed-width fonts Use a fixed-width font when showing plain-text messages @@ -812,6 +814,7 @@ Please submit bug reports, contribute new features and ask questions at Account list Message lists Messages + Folder lists Theme Language diff --git a/res/xml/global_preferences.xml b/res/xml/global_preferences.xml index 75efa5598..cb90924ea 100644 --- a/res/xml/global_preferences.xml +++ b/res/xml/global_preferences.xml @@ -176,6 +176,18 @@ + + + + + + Date: Sun, 30 Sep 2012 23:05:32 -0400 Subject: [PATCH 3/5] Permit the folder list item to expand vertically. Prior to this, in cases where the folder name wraps to mulitiple lines, it could overflow its box and the overflow was hidden. --- res/layout/folder_list_item.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/layout/folder_list_item.xml b/res/layout/folder_list_item.xml index 1050de2a9..89f7f769d 100644 --- a/res/layout/folder_list_item.xml +++ b/res/layout/folder_list_item.xml @@ -23,7 +23,7 @@ Date: Tue, 2 Oct 2012 16:03:59 -0400 Subject: [PATCH 4/5] Control wrapping of folder names programmatically only This removes the default settings (ellipsized, single line) from the layout xml file and implements them programmatically. This fixes the problem where: You are viewing a folder list while wrapping is currently on, then you go into settings and turn wrapping off, after which you are back at the folder list, but the list is still wrapped. --- res/layout/folder_list_item.xml | 2 -- src/com/fsck/k9/activity/FolderList.java | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/res/layout/folder_list_item.xml b/res/layout/folder_list_item.xml index 89f7f769d..bbc885428 100644 --- a/res/layout/folder_list_item.xml +++ b/res/layout/folder_list_item.xml @@ -33,8 +33,6 @@ android:id="@+id/folder_name" android:layout_width="fill_parent" android:layout_height="wrap_content" - android:singleLine="true" - android:ellipsize="start" android:textColor="?android:attr/textColorPrimary" android:textAppearance="?android:attr/textAppearanceLarge" /> diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index 7e11be28f..e0192c62a 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -16,6 +16,7 @@ import android.os.Bundle; import android.os.Handler; import android.os.PowerManager; import android.text.Editable; +import android.text.TextUtils.TruncateAt; import android.text.TextWatcher; import android.util.Log; import android.util.TypedValue; @@ -1164,6 +1165,10 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { holder.folderName.setEllipsize(null); holder.folderName.setSingleLine(false); } + else { + holder.folderName.setEllipsize(TruncateAt.START); + holder.folderName.setSingleLine(true); + } holder.folderStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getFolderStatus()); From 9b851f20e3e93f557c60bf8d03399928ec60a8c3 Mon Sep 17 00:00:00 2001 From: Joe Steele Date: Sat, 22 Dec 2012 23:31:23 -0500 Subject: [PATCH 5/5] Readjust settings version number based on current master --- src/com/fsck/k9/preferences/GlobalSettings.java | 2 +- src/com/fsck/k9/preferences/Settings.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/preferences/GlobalSettings.java b/src/com/fsck/k9/preferences/GlobalSettings.java index fd3b7f00b..8fb83f3bf 100644 --- a/src/com/fsck/k9/preferences/GlobalSettings.java +++ b/src/com/fsck/k9/preferences/GlobalSettings.java @@ -198,7 +198,7 @@ public class GlobalSettings { new V(1, new BooleanSetting(false)) )); s.put("wrapFolderNames", Settings.versions( - new V(21, new BooleanSetting(false)) + new V(22, new BooleanSetting(false)) )); s.put("batchButtonsMarkRead", Settings.versions( new V(8, new BooleanSetting(true)) diff --git a/src/com/fsck/k9/preferences/Settings.java b/src/com/fsck/k9/preferences/Settings.java index d7f521d4b..39431cb28 100644 --- a/src/com/fsck/k9/preferences/Settings.java +++ b/src/com/fsck/k9/preferences/Settings.java @@ -35,7 +35,7 @@ public class Settings { * * @see SettingsExporter */ - public static final int VERSION = 21; + public static final int VERSION = 22; public static Map validate(int version, Map> settings,