Fix up action bar items.
- vertically centers mailboxes - fixes subject lines from extending beyond 2 lines and getting cut off Bug: 5183775 Change-Id: I8f6367edeafdfcf361cafa7e542f4028e955f7f1
This commit is contained in:
parent
f13fee5d78
commit
899e481fd1
@ -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);
|
||||
|
@ -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());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user