You can change the style that applies to each action, or if you want to change the behavior for a specific action, you can try the following:
setDisplayOptions(int options, int mask) --- Set selected display or setDisplayOptions(int options) --- Set display options.
To display the title in the action bar, set the display options to onCreate ()
getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE, ActionBar.DISPLAY_SHOW_TITLE);
To hide the title in the action bar.
getSupportActionBar().setDisplayOptions(0, ActionBar.DISPLAY_SHOW_TITLE);
More details here .
Siqi Liu Aug 14 '14 at 10:32 a.m. 2014-08-14 22:32
source share