Remove cc/bcc option from menu when used.

Bug: 5055403
Change-Id: I3a349ddf7b5b186bb6daccd7151b8b352cab0050
This commit is contained in:
Ben Komalo 2011-07-21 12:09:28 -07:00
parent 9d0bb2e3a0
commit 5479f061ab

View File

@ -1452,6 +1452,7 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
private void showCcBccFields() {
mCcBccContainer.setVisibility(View.VISIBLE);
UiUtilities.setVisibilitySafe(this, R.id.add_cc_bcc, View.INVISIBLE);
invalidateOptionsMenu();
}
/**
@ -1856,6 +1857,8 @@ public class MessageCompose extends Activity implements OnClickListener, OnFocus
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.save).setEnabled(mDraftNeedsSaving);
menu.findItem(R.id.add_cc_bcc).setVisible(
(mCcBccContainer == null) || (mCcBccContainer.getVisibility() != View.VISIBLE));
return true;
}