Making layout borders with title in the top border in Android

This is a example in android for making a border for a RelativeLayout, with a title text in the center on the top border line. Something like this:

Border Title

activity_border_title_demo.xml, this is the layout xml for an activity or fragment. It has two LinearLayout views inside a RelativeLayout. The first LinearLayout for the top border with title in the center, the second LinearLayout for the topless border. Note, the first LinearLayout is not the root tag which is also a LinearLayout.