How to create an "informative" preference

I created PreferenceActivity. Some of the preferences are purely informative. I want them to be a little gray, so it will be clear that clicking on them should not do anything.

How should I do it?

+3
source share
2 answers

You can try to set your activated attribute to false

<Preference android:enabled="false" ... />
-1
source
style="?android:preferenceInformationStyle"
+6
source

Source: https://habr.com/ru/post/1795472/


All Articles