Disabled the Home button when it's not the Up button

This commit is contained in:
Alethea Butler 2014-05-30 23:18:50 -04:00
parent b763d7ad56
commit 78686e9bce
3 changed files with 5 additions and 0 deletions

View File

@ -262,6 +262,7 @@ public class ConversationActivity extends XmppActivity {
public void onPanelOpened(View arg0) {
paneShouldBeOpen = true;
getActionBar().setDisplayHomeAsUpEnabled(false);
getActionBar().setHomeButtonEnabled(false);
getActionBar().setTitle(R.string.app_name);
invalidateOptionsMenu();
hideKeyboard();
@ -273,6 +274,7 @@ public class ConversationActivity extends XmppActivity {
if ((conversationList.size() > 0)
&& (getSelectedConversation() != null)) {
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setHomeButtonEnabled(true);
getActionBar().setTitle(
getSelectedConversation().getName(useSubject));
invalidateOptionsMenu();

View File

@ -527,6 +527,7 @@ public class ConversationFragment extends Fragment {
if (!activity.shouldPaneBeOpen()) {
activity.getSlidingPaneLayout().closePane();
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
activity.getActionBar().setHomeButtonEnabled(true);
activity.getActionBar().setTitle(
conversation.getName(useSubject));
activity.invalidateOptionsMenu();

View File

@ -380,6 +380,7 @@ public class ManageAccountActivity extends XmppActivity {
accountListViewAdapter.notifyDataSetChanged();
if ((this.accountList.size() == 0)&&(this.firstrun)) {
getActionBar().setDisplayHomeAsUpEnabled(false);
getActionBar().setHomeButtonEnabled(false);
addAccount();
this.firstrun = false;
}
@ -429,6 +430,7 @@ public class ManageAccountActivity extends XmppActivity {
public void onAccountEdited(Account account) {
xmppConnectionService.createAccount(account);
activity.getActionBar().setDisplayHomeAsUpEnabled(true);
activity.getActionBar().setHomeButtonEnabled(true);
}
});
dialog.show(getFragmentManager(), "add_account");