Is it possible to make the item in “preferencses.xml” that will appear as “gray” (read-only, like “About/Version” from android main menu?) text without the possibility of interactive editing?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’d like to hard code this and only use xml:
If you’d like to be more dynamic, changing enabled-ness at runtime, you can do this in code (possibly in your settings activity’s onCreate):
And as hwrdprkns points out, if you don’t need the dynamic route (your preference is never used as a real preference), you can use the base preference class instead of a subclass like EditTextPreference.