Skip to content

Commit

Permalink
Android Chromoting: Fully set action-bar state in onStart()
Browse files Browse the repository at this point in the history
This fixes both the title and spinner being shown if you add a second
account to the device, then switch back to the Chromoting app.

NOTRY=true
R=jamiewalch@chromium.org

Review URL: https://codereview.chromium.org/214683006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260006 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
lambroslambrou@chromium.org committed Mar 27, 2014
1 parent 559a507 commit aad9b4a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,12 @@ public void onStart() {

if (mAccounts.length == 1) {
getActionBar().setDisplayShowTitleEnabled(true);
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
getActionBar().setTitle(R.string.mode_me2me);
getActionBar().setSubtitle(mAccount.name);
} else {
mAccountsAdapter = new AccountsAdapter(this, mAccounts);
getActionBar().setDisplayShowTitleEnabled(false);
getActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
getActionBar().setListNavigationCallbacks(mAccountsAdapter, this);
getActionBar().setSelectedNavigationItem(index);
Expand Down

0 comments on commit aad9b4a

Please sign in to comment.