How to show and hide preferences on Android dynamically?

Posted by Japtar on Stack Overflow See other posts from Stack Overflow or by Japtar
Published on 2011-01-16T02:54:58Z Indexed on 2011/01/16 7:53 UTC
Read the original article Hit count: 258

Is there a way to dynamically show and hide preferences? 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?

© Stack Overflow or respective owner

Related posts about android

Related posts about Xml