Make the account dropdown visible again.
Workaround for the framework issue that the app context doesn't use the right theme. Also removed the use of obsolete methods. Bug 3169944 Change-Id: Ic8d3ba2edb9300df549cb902855025815021ff49
This commit is contained in:
parent
4535237e3b
commit
30ba828784
@ -124,7 +124,7 @@ public class MessageListXL extends Activity implements
|
||||
mFragmentManager.setMessageListFragmentCallback(new MessageListFragmentCallback());
|
||||
mFragmentManager.setMessageViewFragmentCallback(new MessageViewFragmentCallback());
|
||||
|
||||
mAccountsSelectorAdapter = new AccountSelectorAdapter(mContext, null);
|
||||
mAccountsSelectorAdapter = new AccountSelectorAdapter(this, null);
|
||||
|
||||
if (isRestoring) {
|
||||
mFragmentManager.loadState(savedInstanceState);
|
||||
@ -503,7 +503,7 @@ public class MessageListXL extends Activity implements
|
||||
final ActionBar ab = getActionBar();
|
||||
if (count == 1) {
|
||||
accountsCursor.moveToFirst();
|
||||
ab.setStandardNavigationMode();
|
||||
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
|
||||
ab.setTitle(AccountSelectorAdapter.getAccountDisplayName(accountsCursor));
|
||||
return;
|
||||
}
|
||||
@ -525,8 +525,9 @@ public class MessageListXL extends Activity implements
|
||||
|
||||
// Update the dropdown list.
|
||||
mAccountsSelectorAdapter.changeCursor(accountsCursor);
|
||||
ab.setDropdownNavigationMode(mAccountsSelectorAdapter,
|
||||
mActionBarNavigationCallback, defaultSelection);
|
||||
ab.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
|
||||
ab.setListNavigationCallbacks(mAccountsSelectorAdapter, mActionBarNavigationCallback);
|
||||
ab.setSelectedNavigationItem(defaultSelection);
|
||||
}
|
||||
|
||||
private class ActionBarNavigationCallback implements ActionBar.NavigationCallback {
|
||||
|
Loading…
Reference in New Issue
Block a user