title: Android Layout like Legend and Fieldset
body: <p>I have a design requirement to show a part as shown in the figure.<img src="https://i.stack.imgur.com/3RYia.png" alt="Example Image"></p>
  
  <p>I have tried the following XML</p>
  
  <pre><code>&lt;LinearLayout
                  android:layout_width="match_parent"
                  android:layout_height="wrap_content"
                  android:orientation="horizontal" &gt;
  
                  &lt;View
                  android:id="@+id/lineLeft"
                  android:layout_height="1dip"
                  android:layout_width="25dp"
                  android:layout_marginBottom="10dp"
                  android:background="#b8b8b8" /&gt;
  
                  &lt;TextView
                      android:id="@+id/link_to_register"
                      android:layout_width="fill_parent"
                      android:layout_height="wrap_content"
                      android:layout_marginBottom="40dip"
                      android:layout_marginTop="40dip"
                      android:gravity="center"
                      android:text="@string/register_label"
                      android:textColor="#525252"
                      android:textSize="20sp" /&gt;
  
                  &lt;View
                  android:id="@+id/lineRight"
                  android:layout_height="1dip"
                  android:layout_width="25dp"
                  android:layout_marginBottom="10dp"
                  android:background="#b8b8b8" /&gt;
  
              &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The above XML shows the TextView, but not the lines. How can I achieve it.</p>
  
  <p>Please help.</p>