Separator view with/without headers as per Android Material Design Guideline
<p>I am trying to create a separator with header per Google Material Design spec, and I couldn't get it to work. Why would google roll out a spec that is not even available on either support or target platform level? So here I am recreating material spec to work with the older version and here is what I got so far:</p>

<pre><code>    &lt;TextView
        android:id="@+id/textview_task_header1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="42dp"
        android:layout_marginBottom="12dp"
        android:drawableTop="@drawable/drawable_separator"
        android:textSize="16sp"
        android:textStyle="bold"
        android:textColor="#bfbfbf"
        android:text="Location"/&gt;
</code></pre>

<p>I want to create a header, a separator of some sort. I don't want to use list because list will require me to create an adapter which I find really impractical in my case. I have to layout the UI using XML and I can't figure it out. </p>

<p>I need something to look like this, I need to have a header without the line separator and a header with one separator:</p>

<p><a href="https://i.stack.imgur.com/j0CGC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j0CGC.png" alt="enter image description here"></a></p>

<p>Also, I was able to achieve to create a header via TextView and set margin top and bottom. The problem is I can't show the drawable line on my case and I don't feel like I am doing the right thing here. Its too messy. </p>

<p>I appreciate if you don't post an answer indicating the use of a hackish solution. I don't like to go down that path for some reason. :/</p>