title: How to achieve gravity="center_vertical" in a RelativeLayout nested within a LinearLayout?
body: <p><a href="https://docs.google.com/document/d/1SDDnAG-jkQjC6F85iPgfv3Et1pYl8t03k-TkCN3YcCw/edit" rel="nofollow">https://docs.google.com/document/d/1SDDnAG-jkQjC6F85iPgfv3Et1pYl8t03k-TkCN3YcCw/edit</a></p>
  
  <hr>
  
  <p>I have an Android preference page containing a mixture of stock, and custom List Items. The custom list items "Mood" and "Mixed Mood" can be seen in the screen shot in the referenced Google Doc, and function in the following way. (The external link is because, without a reputation of at leat 10, I'm not allowed to post images in stackoverflow...)</p>
  
  <p>1) Before a user has chosen a value, they simply display their title. (either Mood or MixedMood)</p>
  
  <p>2) After a user has chosen a value, they display their title AND a custom tool tip (the little colored squares), indicating their choice.</p>
  
  <p>THE PROBLEM: You can see from the screen shot that before a user has chosen a value, the "Mood" text is not centered. I would like for it to be centered, and then dynamically make room for the custom tool tip after a choice is made. In other words, I would like </p>
  
  <pre><code>&lt;TextView android:id="@+android:id/title" 
  </code></pre>
  
  <p>To respond to </p>
  
  <pre><code>android:gravity="center_vertical". 
  </code></pre>
  
  <p>Is this possible?</p>
  
  <p>My layout file looks like this. </p>
  
  <hr>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:minHeight="60dip"
      android:gravity="center_vertical"
      android:paddingRight="?android:attr/scrollbarSize"&gt;
  
      &lt;RelativeLayout 
           android:layout_width="fill_parent" 
           android:layout_height="wrap_content" 
           android:gravity="center_vertical" 
           android:layout_marginLeft="15dip" 
           android:layout_marginRight="6dip"&gt; 
  
          &lt;TextView android:id="@+android:id/title"
              android:layout_width="wrap_content"
              android:layout_height="fill_parent"
              android:gravity="center_vertical"
              android:textAppearance="?android:attr/textAppearanceLarge"
              android:textSize="18sp"/&gt;
          &lt;!-- This image represents the dropdown arrow --&gt;
          &lt;ImageView
              android:gravity="center_vertical"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:layout_toRightOf="@android:id/title"
              android:scaleType="fitEnd"
              android:src="@drawable/ic_btn_round_more_normal_cropped" /&gt;
  
          &lt;monarca_rct.client.customcomponents.MoodScalePresentation
              android:id="@+android:id/hpmp_mood_scale"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_below="@android:id/title"
              android:paddingTop="4.0dp"/&gt;
  
      &lt;/RelativeLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>