Divisor entre categoría en PreferenceFragment

Estoy tratando de lograr la apariencia de la aplicación de configuración, lo que significa que estoy buscando la solución para agregar divisor entre las categorías.

Ajustes

Así que pensé que encontré una solución, pero por desgracia no funciona para mí. Como se sugirió debería agregar preferencia vacía con diseño:

</PreferenceCategory> <Preference android:title="Test" android:summary="Summary"/> </PreferenceCategory> <Preference layout="@layout/divider_preference" /> <PreferenceCategory android:title="Category"/> 

Aquí está divisor:

 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="10dp" android:orientation="vertical"> <View android:layout_width="match_parent" android:layout_height="5dp" android:background="@drawable/shadow_bottom"/> <View android:layout_width="match_parent" android:layout_height="5dp" android:background="@drawable/shadow_top"/> </LinearLayout> 

Pero lo que recibo es simplemente preferencia vacía:

Mi

Entonces, ¿cómo podría arreglar eso?

Pruebe con esto:

 <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:layout="@layout/divider_preference" android:title="Category1"> <Preference android:title="Test" android:summary="Summary"/> </PreferenceCategory> <PreferenceCategory android:layout="@layout/divider_preference" android:title="Category2"> <Preference android:title="Test1" android:summary="Summary1"/> </PreferenceCategory> </PreferenceScreen> 
FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.