Divider between category in PreferenceFragment
<p>I'm trying to achieve Settings app look, which means I'm looking for solution to add divider between categories.</p>

<p><a href="https://i.stack.imgur.com/9l6ZL.png"><img src="https://i.stack.imgur.com/9l6ZL.png" alt="Settings"></a></p>

<p>So I thought I found solution, but unfortunately it's not working for me. As was suggested I should add empty preference with layout:</p>

<pre><code>&lt;/PreferenceCategory&gt;
    &lt;Preference
        android:title="Test"
        android:summary="Summary"/&gt;

&lt;/PreferenceCategory&gt;

&lt;Preference layout="@layout/divider_preference" /&gt;

&lt;PreferenceCategory
    android:title="Category"/&gt;
</code></pre>

<p>Here is divider:</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="10dp"
              android:orientation="vertical"&gt;

    &lt;View
        android:layout_width="match_parent"
        android:layout_height="5dp"
        android:background="@drawable/shadow_bottom"/&gt;

    &lt;View
        android:layout_width="match_parent"
        android:layout_height="5dp"
        android:background="@drawable/shadow_top"/&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>But what I get is just empty preference:</p>

<p><a href="https://i.stack.imgur.com/K8tKG.png"><img src="https://i.stack.imgur.com/K8tKG.png" alt="My"></a></p>

<p>So how could I fix that?</p>