From 1be368092ef0b05244108a1071bf8adad5db91ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Mon, 30 Dec 2013 21:46:42 +0100 Subject: Fix custom action bars for Android 4.4 --- .../sufficientlysecure/keychain/helper/ActionBarHelper.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/ActionBarHelper.java') diff --git a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/ActionBarHelper.java b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/ActionBarHelper.java index dcac2df08..fee120273 100644 --- a/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/ActionBarHelper.java +++ b/OpenPGP-Keychain/src/org/sufficientlysecure/keychain/helper/ActionBarHelper.java @@ -81,8 +81,9 @@ public class ActionBarHelper { cancelOnClickListener); // Show the custom action bar view and hide the normal Home icon and title. - actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM - | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE); + actionBar.setDisplayShowTitleEnabled(false); + actionBar.setDisplayShowHomeEnabled(false); + actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(customActionBarView, new ActionBar.LayoutParams( ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); } @@ -107,8 +108,9 @@ public class ActionBarHelper { doneOnClickListener); // Show the custom action bar view and hide the normal Home icon and title. - actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM - | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE); + actionBar.setDisplayShowTitleEnabled(false); + actionBar.setDisplayShowHomeEnabled(false); + actionBar.setDisplayShowCustomEnabled(true); actionBar.setCustomView(customActionBarView); } -- cgit v1.2.3