today encountered a very painful problem, that is, in the custom Actionbar, Setcustomview, the custom view can not cover the entire view, left there is a blank, see :
All the code that can be added has been added, actionbar.setdisplayshowhomeenabled (false);
actionbar.setdisplayhomeasupenabled (FALSE);
actionbar.setdisplayshowtitleenabled (false);
actionbar.setdisplayuselogoenabled (false);
actionbar.setdisplayoptions (actionbar.display_show_custom);
actionbar.setdisplayshowcustomenabled (true);
Actionbar.layoutparams params = new Actionbar.layoutparams ( RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);
Actionbar.setcustomview (Mactionbar, params);
But still do not, the last check data only found that Android 5.0 and appcompat-v7:21 Ancionbar replaced with Toobar is such an effect, can not change, may be used R20 (including) the following appcompat-v7:20 can be replaced
And the APPCOMPAT-V7 version I used in the project is 21, code: Compile ' com.android.support:appcompat-v7:21.0.3 '
After the change to 19.1.0 is no problem, changed to compile ' com.android.support:appcompat-v7:19.1.0 '
After that, there will be no problem, so please record.
android-custom Actionbar bug fixes with incomplete left overlay