By customizing the Actionbar layout to change the style of the Actionbar, simple and beautiful, but there is a detail must be noted in the high resolution left blank problem, generally in the resolution of more than 720 next found no matter how you change the layout file there will always be a small blank
public void setactionbarlayout (int layoutid) {ActionBar ActionBar = Getactionbar (); if (null! = ActionBar) {//Remove blank Actionba R.settitle (""); actionbar.setdisplayshowhomeenabled (false); actionbar.setdisplayshowcustomenabled (true); Layoutinflater inflator = (layoutinflater) this.getsystemservice (Context.layout_inflater_service); View v = inflator.inflate (LayoutID, NULL); Actionbar.layoutparams layout = new Actionbar.layoutparams (layoutparams.match_parent, layoutparams.match_parent); Actionbar.setcustomview (v, layout);}
Then call and pass in the layout at the appropriate location
Setactionbarlayout (R.layout.item_setting_actionbar);
Customize Actionbar and remove left margin