title: How to make imagebutton appear and textview center for toolbar?
body: <p>I have a tool bar with one icon on the left and one icon on the right. In the center will be a text view? Below is my current layout settings.</p>
  
  <p>The problem now is the the imagebutton image is not appearing is just a small silver color rectangle appear and the text view words are aligning to left rather than center. Another thing how to control the height of the icon text view such that they look similar? The final icon on the right does not appear either too.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v7.widget.Toolbar
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:id="@+id/bottomToolbar"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:background="@color/primary"
      android:minHeight="@android:dimen/notification_large_icon_height"&gt;
  
      &lt;ImageButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/pinButton"
      android:layout_centerHorizontal="true"
      android:layout_gravity="left"
      android:drawable="@drawable/basgreen"
      android:clickable="true"/&gt;
  
      &lt;TextView
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:textSize="20sp"
          android:text="TEST"
          android:background="@color/primary"
          android:textColor="#ffffff"
          android:layout_gravity="center"
          android:padding="10dip"/&gt;
  
  
      &lt;ImageButton
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:id="@+id/pinButton3"
          android:layout_centerHorizontal="true"
          android:layout_gravity="right"
          android:drawable="@drawable/basgreen"
          android:clickable="true"/&gt;
  
  &lt;/android.support.v7.widget.Toolbar&gt;
  </code></pre>
  
  <p>Below is the final screen shot of the output so far.</p>
  
  <p><a href="https://i.stack.imgur.com/G8AIb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/G8AIb.png" alt="enter image description here"></a></p>