Here is an image of my custom action bar:

I want to use the entire wid
Read this link1, link2 and set the contentInsets to 0dp like done below:
View mCustomView = mInflater.inflate(R.layout.actionbar_invoice, null);
getSupportActionBar().setCustomView(mCustomView);
Toolbar toolbar=(Toolbar)mCustomView.getParent();
toolbar.setContentInsetsAbsolute(0,0);
If you are using custom Toolbar instead of ActionBar then use below code:
I Hope this might help you.