Is possible to hide a preference in a PreferenceScreen? I don’t need to disable it, it must be invisible (sometimes)
Important: I need to keep the min API level 7+
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 your logout button (Preference) is in the PreferenceScreen, do this:
Else if your logout button (Preference) is in a PreferenceCategory (which is inside a PreferenceScreen), do this:
You can put whatever your preferences name is, this is for example for a logout preference, if you have another Preference (eg CheckBoxPreference) you need to cast that specific Preference before findPreference.