title: How to RelativeLayout Align Center android
body: <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="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="78dp"
          android:layout_marginTop="199dp"
          android:text="test" /&gt;
  
       &lt;TextView
          android:id="@+id/textView2"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/textView1"
          android:text="I want to align Center" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is my xml code.</p>
  
  <p>I want to use layout_alignCenter="@+id/textView1" in TextView2. </p>
  
  <p>But there is no alignCenter. </p>
  
  <p>I think layout_centerVertical or centerinParent also useless.</p>