title: Custom View preventing Action Bar Title from showing?
body: <p>I have an action bar that has a custom view but for some reason, when I add the custom view onto the action bar, my <code>actionBar</code> label that I declared in my <code>AndroidManifest.xml</code> is not showing. Here is my attempt:</p>
  
  <p>AndroidManifest.xml:</p>
  
  <pre><code>    &lt;activity android:name=".com.tabs.activity.CreatePost"
          android:label="Create Post"
          android:theme="@style/AppTheme.NoActionBar"
          android:windowSoftInputMode="stateVisible"&gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value=".com.tabs.activity.news_feed"/&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>Action bar layout:
  create_post_menu.xml </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;menu 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"
      tools:context=".CreatePost"&gt;
  
      &lt;item
          android:id="@+id/privacy_toggle"
          android:title=""
          app:showAsAction="always"
          android:orderInCategory="1"
          android:actionLayout="@layout/privacy_toggle_layout" /&gt;
  
      &lt;item
          android:id="@+id/send_post"
          android:orderInCategory="2"
          android:title="Send"
          app:showAsAction="always" /&gt;
  
  &lt;/menu&gt;
  </code></pre>
  
  <p>privacy_toggle_layout.xml</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"&gt;
      &lt;RadioGroup
          android:checkedButton="@+id/offer"
          android:id="@+id/privacy_toggle"
          android:layout_width="wrap_content"
          android:layout_height="25dp"
          android:background="@drawable/pick_out_line"
          android:orientation="horizontal"
          android:layout_alignParentRight="true"&gt;
  
          &lt;RadioButton
              android:layout_marginTop="1dp"
              android:layout_marginBottom="1dp"
              android:layout_marginLeft="1dp"
              android:id="@+id/public_toggle"
              android:background="@drawable/toggle_widget_background"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:button="@null"
              android:gravity="center"
              android:text="Public"
              android:textColor="@color/white" /&gt;
  
          &lt;RadioButton
              android:layout_marginRight="1dp"
              android:layout_marginTop="1dp"
              android:layout_marginBottom="1dp"
              android:id="@+id/private_toggle"
              android:layout_width="0dp"
              android:layout_height="match_parent"
              android:layout_weight="1"
              android:background="@drawable/toggle_widget_background"
              android:button="@null"
              android:gravity="center"
              android:text="Private"
              android:checked="true"
              android:textColor="@color/white" /&gt;
      &lt;/RadioGroup&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>CreatePost.java (I am just showing how I instantiate the action bar)</p>
  
  <pre><code>private void setupActionBar(){
      Toolbar toolbar = (Toolbar) findViewById(R.id.create_post_toolbar);
      setSupportActionBar(toolbar);
      //Back bar enabled
      getSupportActionBar().setDisplayHomeAsUpEnabled(true);
      getSupportActionBar().setDisplayShowHomeEnabled(true);
      //Toggle bar enabled
      ActionBar actionBar = getSupportActionBar();
      actionBar.setCustomView(R.layout.privacy_toggle_layout);
      actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_CUSTOM);
      final RadioGroup privacyToggle = (RadioGroup) findViewById(R.id.privacy_toggle);
      final RadioButton publicToggle = (RadioButton) findViewById(R.id.public_toggle);
      final RadioButton privateToggle = (RadioButton) findViewById(R.id.private_toggle);
  
      privateToggle.setTextColor(ContextCompat.getColor(this, R.color.colorPrimary));
  
      //Set listener for clicking on toggle
      privacyToggle.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
          @Override
          public void onCheckedChanged(RadioGroup group, int checkedId) {
              if(checkedId == R.id.public_toggle){
                  System.out.println("Toggled public");
              }
              else {
                  System.out.println("Toggled private");
              }
          }
      });
  }
  </code></pre>
  
  <p>Even if I have <code>ActionBar.DISPLAY_SHOW_TITLE</code>, the <code>label</code> declared in the AndroidManifest.xml is not showing, and I also don't have any padding/margins added anywhere that might deter the label from showing. Here is a photo to show what is happening. Any help is appreciated, thanks<img src="https://i.stack.imgur.com/EMkc6.png" alt="![enter image description here">]<a href="https://i.stack.imgur.com/EMkc6.png" rel="nofollow noreferrer">1</a></p>