title: How to place a text between two straight line android?
body: <p>I need to place a text between a straight line. I tried by using view but textview comes below the line. How to solve this?
  My code is as follows:</p>
  
  <pre><code>   &lt;RelativeLayout
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:layout_marginTop="10dp"
  
   &gt;
  &lt;View
  
           android:layout_width="wrap_content"
           android:layout_height="2dp"
           android:layout_alignParentLeft="true"
           android:layout_toLeftOf="@+id/orText"
           android:background="#c0c0c0"/&gt;
   &lt;View
           android:layout_width="wrap_content"
           android:layout_height="2dp"
           android:background="#c0c0c0"
           android:layout_toRightOf="@+id/orText"
           android:layout_alignParentRight="true"/&gt;
  
   &lt;TextView
       android:id="@+id/orText"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_alignParentTop="true"
       android:layout_centerHorizontal="true"
       android:text="OR"
       android:textColor="@android:color/black" /&gt;
  
   &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Here is screenshot,</p>
  
  <p><img src="https://i.stack.imgur.com/11lDZ.png" alt="enter image description here"></p>