From 85fc76c10b04099011db6301cca12a64c0ca6bd2 Mon Sep 17 00:00:00 2001 From: Sander Bogaert Date: Wed, 25 Jul 2012 18:10:30 -0400 Subject: [PATCH] Have the icon function as 'up' instead of 'home'. --- src/com/fsck/k9/activity/FolderList.java | 4 ++-- src/com/fsck/k9/activity/MessageList.java | 5 ++--- src/com/fsck/k9/activity/MessageView.java | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index bd0c29d17..8394fb57a 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -306,6 +306,7 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { requestWindowFeature(Window.FEATURE_PROGRESS); ActionBar actionBar = getSupportActionBar(); + actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setDisplayShowTitleEnabled(false); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); @@ -557,8 +558,7 @@ public class FolderList extends K9ListActivity implements OnNavigationListener { @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: - Accounts.listAccountsClearTop(this); - finish(); + onAccounts(); return true; diff --git a/src/com/fsck/k9/activity/MessageList.java b/src/com/fsck/k9/activity/MessageList.java index 5d6e83dec..d51036b65 100644 --- a/src/com/fsck/k9/activity/MessageList.java +++ b/src/com/fsck/k9/activity/MessageList.java @@ -914,6 +914,7 @@ public class MessageList extends K9ListActivity implements } }); + mActionBar.setDisplayHomeAsUpEnabled(true); mActionBar.setCustomView(mCustomRefreshView); mActionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM); @@ -1461,9 +1462,7 @@ public class MessageList extends K9ListActivity implements int itemId = item.getItemId(); switch (itemId) { case android.R.id.home: { - // app icon in action bar clicked; go home - Accounts.listAccountsClearTop(this); - finish(); + onShowFolderList(); return true; } case R.id.compose: { diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index 854b26c3b..05d9be699 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -318,6 +318,8 @@ public class MessageView extends K9Activity implements OnClickListener { requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); setContentView(R.layout.message_view); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); + mMessageView = (SingleMessageView) findViewById(R.id.message_view); //set a callback for the attachment view. With this callback the attachmentview @@ -853,7 +855,6 @@ public class MessageView extends K9Activity implements OnClickListener { public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: - Accounts.listAccountsClearTop(this); finish(); break; case R.id.delete: