How to show and hide preferences on Android dynamically?

From a PreferenceActivity call Preference somePreference = findPreference(SOME_PREFERENCE_KEY); PreferenceScreen preferenceScreen = getPreferenceScreen(); preferenceScreen. RemovePreference(somePreference) you can later call: preferenceScreen. AddPreference(somePreference) The only a little bit tricky part is getting the order correct when adding back in.

Look at PreferenceScreen documentation, particularly it's base class PreferenceGroup for details.

From a PreferenceActivity call Preference somePreference = findPreference(SOME_PREFERENCE_KEY); PreferenceScreen preferenceScreen = getPreferenceScreen(); preferenceScreen. RemovePreference(somePreference); you can later call: preferenceScreen. AddPreference(somePreference); The only a little bit tricky part is getting the order correct when adding back in.

Look at PreferenceScreen documentation, particularly it's base class, PreferenceGroup for details.

Grr, I guess there's no "visible" options in Android, after all. Thanks for the answer. – Japtar Jan 17 at 2:32.

In my case, I have a checkbox preference that would disable or enable one of 2 preference groups ("with-" and "without-handicap" groups). While this would be the ideal GUI in a desktop environment, the "with-handicap" takes up nearly the whole screen, while the other, "without-handicap" takes up only a small portion of the screen. Rather than showing both groups at the same time, I'd like to show only one of them at a time, and dynamically show or hide the 2 groups when the checkbox changes.

Is there a way to do this?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions