Reputation: 730
Im having a couple of issues with my android preferences. Firstly i want a line divider/horizontal rule below my PreferenceCategory
(Accounts), which in the preferences tutorial seems to automatically be placed under category headings, but in my case has not. Another issue is i would like to change the color of my preference title's (Add Account and Remove Account). At the moment they seem to be getting colored via my <item name="android:textColorPrimary">@color/text_primary</item>
located in my style.xml
, which i cannot change as i want the Settings title to remain white. Below is an image of where i currently am:
If anybody could advise me on resolving these issue's it would be much appreciated. Thanks
Upvotes: 0
Views: 526
Reputation: 3441
Just like any other UI aspect of Android
, you can customize it using a custom XML file. Just create a new layout (ex. custom_preference) and just set that in your Preference
:
<Preference
android:title="@string/label_pref_version"
android:key="@string/pref_version"
android:layout="@layout/custom_preference" />
Upvotes: 1