Don't show app name on action bar

Need to hide the action bar title when showing account spinner.

Change-Id: Id85fa91f1b89fbd9d2a92bd2d175121176b8a2f0
This commit is contained in:
Makoto Onuki 2010-12-16 11:32:28 -08:00
parent a9939ab165
commit 303816534d
1 changed files with 6 additions and 0 deletions

View File

@ -607,6 +607,9 @@ public class MessageListXL extends Activity implements
final ActionBar ab = getActionBar();
if (count == 1) {
accountsCursor.moveToFirst();
// Show the account name as the title.
ab.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
ab.setTitle(AccountSelectorAdapter.getAccountDisplayName(accountsCursor));
return;
@ -629,6 +632,9 @@ public class MessageListXL extends Activity implements
// Update the dropdown list.
mAccountsSelectorAdapter.changeCursor(accountsCursor);
// Don't show the title.
ab.setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
ab.setListNavigationCallbacks(mAccountsSelectorAdapter, mActionBarNavigationCallback);
ab.setSelectedNavigationItem(defaultSelection);