mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-17 07:30:16 -05:00
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.
This commit is contained in:
parent
2c20413af6
commit
d5a2c6b5c7
@ -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" />
|
||||
|
||||
|
@ -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());
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user