title: Why title is not centered in toolbar?
body: <p>I am trying to add customized toolbar i want cart badge count so i added the relative layout to toolbar widget, when i didn't added relative layout in toolbar the  title appeared in center but now removing relative layout causes problem in adding badge textview on cart, can anybody suggest what to do in this situation? 
  Toolbar.xml
      </p>
  
  <pre><code>&lt;android.support.v7.widget.Toolbar
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/mytoolbar"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  app:contentInsetStart="0dp"
  app:contentInsetRight="0dp"
  app:contentInsetLeft="0dp"
  android:clipToPadding="false"
  app:contentInsetStartWithNavigation="0dp"
  app:contentInsetEndWithActions="0dp"
  android:background="@color/header"&gt;
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  
  &lt;TextView
      android:id="@+id/displaytexttoolbar"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerInParent="true"
      android:layout_gravity="center"
      android:layout_margin="@dimen/activity_vertical_margin"
      android:text="TEXT_VIEW"
      android:textColor="@color/white" /&gt;
  
  &lt;RelativeLayout
      android:layout_gravity="right"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
  
  
      &lt;ImageView
          android:id="@+id/cart_imagetoolbar"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentRight="true"
          android:layout_centerVertical="true"
          android:layout_gravity="end"
          android:layout_margin="@dimen/activity_vertical_margin"
          android:src="@drawable/cart_mobile_white" /&gt;
  
      &lt;TextView
          android:id="@+id/tvBadge"
          android:layout_width="20dp"
          android:layout_height="20dp"
          android:layout_alignParentRight="true"
          android:layout_gravity="right"
          android:background="@drawable/cart_circle_mobile"
          android:gravity="center"
          android:textColor="@color/white"
          android:visibility="visible" /&gt;
  
  
  
  &lt;/RelativeLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p></p>
  
  <p><a href="https://i.stack.imgur.com/NdinQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NdinQ.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/S97hm.png" rel="noreferrer"><img src="https://i.stack.imgur.com/S97hm.png" alt="enter image description here"></a><a href="https://i.stack.imgur.com/qVEh9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/qVEh9.png" alt="enter image description here"></a></p>