title: Android: right margin at Up button on the Toolbar
body: <p>I'm setting custom view into my Toolbar:</p>
  
  <pre><code>ActionBar actionBar = getSupportActionBar();
  View customView = getLayoutInflater().inflate(resId, null);
  actionBar.setCustomView(customView);
  actionBar.setDisplayShowCustomEnabled(true);
  </code></pre>
  
  <p>It looks fine until I enabling Up button:</p>
  
  <pre><code>getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  </code></pre>
  
  <p>Here are pictures of the toolbar with Up button and without. I've added gray color to my custom view's background to view the real element size.</p>
  
  <p><strong>Without:</strong><br>
  <a href="https://i.stack.imgur.com/yqosg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yqosg.png" alt="without"></a></p>
  
  <p><strong>With:</strong><br>
  <a href="https://i.stack.imgur.com/m9wrF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m9wrF.png" alt="with"></a></p>
  
  <p>And here is an image of Layout inspector window. There is a space between Up button and custom view.</p>
  
  <p><a href="https://i.stack.imgur.com/5zSCw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5zSCw.png" alt="layout inspector"></a></p>