title: Android Toolbar Margin
body: <p>I have a question about the android toolbar. Normally, the toolbar fills the whole space from left to right and has no margin to the top.</p>
  
  <p>Mine looks like a tile and has margins everywhere. Android Studio renders it just fine, but when I run it on a Galaxy Tab 4, it looks like a tile.</p>
  
  <p>Screenshot</p>
  
  <p><a href="https://i.stack.imgur.com/rbRhD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rbRhD.png" alt="enter image description here"></a></p>
  
  <hr>
  
  <p>Activity:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_newsreader);
  
      // create the toolbar
      toolbar = (Toolbar) findViewById(R.id.app_bar);
      setSupportActionBar(toolbar);
      getSupportActionBar().setHomeButtonEnabled(true);
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  </code></pre>
  
  <p>app_bar.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.Toolbarxmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:background="@color/primary"
  app:popupTheme="@style/CustomToolbarPopup"
  app:theme="@style/CustomToolbarTheme"
  app:navigationIcon="@drawable/ic_home_white_16dp"&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>styles.xml</p>
  
  <p></p>
  
  <pre><code>&lt;!-- Base application theme. --&gt;
  &lt;style name="AppTheme" parent="AppTheme.Base"&gt;
      &lt;item name="colorPrimary"&gt;@color/primary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/primary_dark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/primary&lt;/item&gt;
      &lt;item name="android:textColorPrimary"&gt;@color/primary_text&lt;/item&gt;
      &lt;item name="android:textColorSecondary"&gt;@color/secondary_text&lt;/item&gt;
      &lt;item name="windowActionModeOverlay"&gt;true&lt;/item&gt;
      &lt;item name="actionModeBackground"&gt;@android:color/black&lt;/item&gt;
  &lt;/style&gt;
  
  
  &lt;!-- --&gt;
  &lt;style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/primary&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/primary_dark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/accent&lt;/item&gt;
  &lt;/style&gt;
  &lt;!----&gt;
  &lt;style name="CustomToolbarTheme" parent="Base.ThemeOverlay.AppCompat.Dark"&gt;
      &lt;item name="android:textColorPrimary"&gt;@color/toolbar_text&lt;/item&gt;
      &lt;item name="windowActionModeOverlay"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="CustomToolbarPopup" parent="Base.ThemeOverlay.AppCompat.Light"&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p></p>