diff --git a/src/com/android/email/activity/AccountSelectorAdapter.java b/src/com/android/email/activity/AccountSelectorAdapter.java index a1c33356b..177a5a188 100644 --- a/src/com/android/email/activity/AccountSelectorAdapter.java +++ b/src/com/android/email/activity/AccountSelectorAdapter.java @@ -156,14 +156,14 @@ public class AccountSelectorAdapter extends CursorAdapter { displayNameView.setText(displayName); // Show the email address only when it's different from the display name. - if (displayName.equals(emailAddress)) { + boolean isAccount = isAccountItem(c); + if (displayName.equals(emailAddress) || !isAccount) { emailAddressView.setVisibility(View.GONE); } else { emailAddressView.setVisibility(View.VISIBLE); emailAddressView.setText(emailAddress); } - boolean isAccount = isAccountItem(c); long id = getId(c); if (isAccount || id != Mailbox.NO_MAILBOX) { unreadCountView.setVisibility(View.VISIBLE); diff --git a/src/com/android/email/activity/ActionBarController.java b/src/com/android/email/activity/ActionBarController.java index 2674fb65a..8f4747266 100644 --- a/src/com/android/email/activity/ActionBarController.java +++ b/src/com/android/email/activity/ActionBarController.java @@ -444,6 +444,7 @@ public class ActionBarController { if (mTitleMode == Callback.TITLE_MODE_MESSAGE_SUBJECT) { mAccountSpinnerLine1View.setSingleLine(false); + mAccountSpinnerLine1View.setMaxLines(2); mAccountSpinnerLine1View.setText(mCallback.getMessageSubject()); mAccountSpinnerLine2View.setVisibility(View.GONE); @@ -460,7 +461,10 @@ public class ActionBarController { mailboxName = null; } + // Note - setSingleLine is needed as well as setMaxLines since they set different + // flags on the view. mAccountSpinnerLine1View.setSingleLine(); + mAccountSpinnerLine1View.setMaxLines(1); if (TextUtils.isEmpty(mailboxName)) { mAccountSpinnerLine1View.setText(mCursor.getAccountDisplayName());