Search code examples
androidandroid-preferencespreferenceactivity

Android: Disabled preference with regular font colors


I got a PreferenceActivity with a preference which is disabled by setting the android:enabled="false" in the xml. When doing so, the preference appear like disabled things do - with fade colors. Is there a way to display the disabled preference with regular string color like an enabled preference? Or maybe there's a way to just add a regular preference which is not disabled but somehow not editable and won't respond when clicked on?


Solution

  • I solved it by setting another property at the definition of the preference:

    android:selectable="false"