Fix custom action bars for Android 4.4

This commit is contained in:
Dominik Schürmann
2013-12-30 21:46:42 +01:00
parent 2c0b2e356b
commit 1be368092e
3 changed files with 10 additions and 40 deletions

View File

@@ -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);
}