title: How to make android action bar title center aligned?
body: <p>I tried my own Custom Action bar for getting action bar title centered on the middle. It worked. However, after I added the options menu in Action bar, the title again shifted to the left. What should I do in order to get the title centered on the middle of the action bar?
  my code is:</p>
  
  <pre><code>    ActionBar actionBar = getActionBar();
      actionBar.setDisplayHomeAsUpEnabled(false);
      actionBar.setDisplayShowCustomEnabled(true);
      actionBar.setDisplayShowTitleEnabled(false);    
      actionBar.setDisplayUseLogoEnabled(false);
      actionBar.setDisplayShowHomeEnabled(false);
      actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM); 
      View cView = getLayoutInflater().inflate(R.layout.custom_actionbar, null);
      actionBar.setCustomView(cView);
  </code></pre>
  
  <p>and my layout is </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:layout_gravity="center"
  android:background="@android:color/holo_blue_light"
  android:orientation="vertical" &gt;
  
  &lt;TextView
      android:id="@+id/apptitle"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerInParent="true"
      android:layout_gravity="center_horizontal|center_vertical"
      android:gravity="center_horizontal|center_vertical"
      android:text="@string/app_name" /&gt;
  </code></pre>
  
  <p></p>