title: Custom layout in Toolbar with TabLayout below
body: <p>Right now, I have a normal looking <code>Toolbar</code>. What I want to do is add a custom layout between the <code>Toolbar</code> and the <code>TabLayout</code>, as shown in the picture below:</p>
  
  <p><a href="https://i.stack.imgur.com/vQJka.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vQJka.png" alt="enter image description here"></a></p>
  
  <p>On the left is what my <code>Toolbar</code> looks like now, and on the right is what I want it to look like.</p>
  
  <p>As you can see, I want to add an <code>ImageView</code> and two <code>TextView</code>s to the layout.</p>
  
  <p>How can I achieve this?</p>
  
  <p>Here is my current layout:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.design.widget.CoordinatorLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/main_content"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt;
  
      &lt;android.support.design.widget.AppBarLayout
          android:id="@+id/appbar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:theme="@style/AppTheme.AppBarOverlay"&gt;
  
          &lt;android.support.v7.widget.Toolbar
              android:id="@+id/toolbar"
              android:layout_width="match_parent"
              android:layout_height="?attr/actionBarSize"
              app:layout_collapseMode="pin"
              app:layout_scrollFlags="scroll|enterAlways"
              app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;
  
          &lt;android.support.design.widget.TabLayout
              android:id="@+id/tablayout"
              android:layout_width="match_parent"
              android:layout_height="48dp"
              app:layout_scrollFlags="scroll|enterAlways" /&gt;
  
      &lt;/android.support.design.widget.AppBarLayout&gt;
  
      &lt;android.support.v4.view.ViewPager
          android:id="@+id/container"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          app:layout_behavior="@string/appbar_scrolling_view_behavior" /&gt;
  
  &lt;/android.support.design.widget.CoordinatorLayout&gt;
  </code></pre>