title: Android linear layout align center and right
body: <p>This is what I have:</p>
  
  <p><img src="https://i.stack.imgur.com/FH6X9.png" alt="enter image description here"></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout android:id="@+id/LinearLayout01"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:background="#FFFFFF"&gt;
      &lt;LinearLayout android:id="@+id/LinearLayout01"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          xmlns:android="http://schemas.android.com/apk/res/android"
          android:orientation="horizontal"
          android:background="#E30000"
          android:layout_gravity="center_horizontal|center_vertical"
          android:gravity="center_horizontal|center_vertical"&gt;
          &lt;TextView 
              android:id="@+id/TextView00"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="#FFFFFF"
              android:textSize="20px"
              android:textStyle="bold"
              android:text="Something"
              android:gravity="right|center_vertical"
              /&gt;
          &lt;LinearLayout android:id="@+id/LinearLayout01"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="horizontal"
              android:gravity="right|center_vertical"
              android:layout_gravity="center_vertical"
              android:background="#E30000"&gt;
              &lt;Button 
                  android:id="@+id/btnCalls"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:drawableLeft="@drawable/icon"
                  android:gravity="right|center_vertical"
              /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>And I want this:</p>
  
  <p><img src="https://i.stack.imgur.com/bEeEK.png" alt="enter image description here"></p>
  
  <p>So horizontal center align the text and vertical center align the button.</p>
  
  <p>What am I missing? I haven't tried RelativeLayout and I would prefer LinearLayout to work this out.</p>