Q:

hide CheckBoxPreference on some condition

I have two CheckBoxPreferences in my Settings page and I want to hide one of them if a condition is satisfied. I see that there is no setVisibility method in CheckBoxPreference. Is there a way to accomplish this?
Any help is appreciated.thanks.

A:

Solved it by adding the CheckBoxPreference through the java code

