I have an Activity preference in my application, and I tried to set a preference style using the following topic:
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="MyPreferenceTheme" parent="android:Theme.Translucent"> <item name="android:preferenceStyle">@style/MyPreference</item> <item name="android:windowBackground">@color/transparent_black</item> </style> <style name="MyPreference" parent="@android:style/Preference"> <item name="android:layout">@layout/preference</item> </style> <color name="transparent_black">#BB000000</color>
So, I know that the theme loads when the background is correctly colored. However, my custom preferenceLayout (res / layout / preference.xml) does not apply to any preferences inside my preference setting.
Is this the right way to achieve preference? or am I missing something? Thanks in advance:)
source share