1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Make the icon up navigation work in messagelist when displaying a query, tapping it takes you back to the account screen.

This commit is contained in:
Sander Bogaert 2012-08-02 10:14:16 -04:00 committed by Andrew Chen
parent 6daa8a3c0c
commit f530af7f8b

View File

@ -673,7 +673,7 @@ public class MessageList extends K9ListActivity implements
mInflater = getLayoutInflater();
mActionBar = getSupportActionBar();
if (mQueryString == null) initializeActionBar();
initializeActionBar();
initializeLayout();
// Only set "touchable" when we're first starting up the activity.
@ -905,13 +905,16 @@ public class MessageList extends K9ListActivity implements
}
private void initializeActionBar() {
mActionBar.setDisplayHomeAsUpEnabled(true);
if (mQueryString == null) {
mActionBar.setDisplayShowTitleEnabled(false);
mActionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST);
mNavigationSpinner = ActionBarNavigationSpinner.getDefaultSpinner(this);
mActionBar.setListNavigationCallbacks(mNavigationSpinner, this);
}
mActionBar.setDisplayHomeAsUpEnabled(true);
}
private void initializeLayout() {
mListView = getListView();
mListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_INSET);
@ -1448,7 +1451,11 @@ public class MessageList extends K9ListActivity implements
int itemId = item.getItemId();
switch (itemId) {
case android.R.id.home: {
if (mQueryString == null) {
onShowFolderList();
} else {
onAccounts();
}
return true;
}
case R.id.compose: {