Is there a way to perform an action related to a Preference in a PreferenceActivity? I've been using this:
CheckBoxPreference thing = (CheckBoxPreference) findPreference("thing");
thing.setChecked(true);
The first line runs okay but the second line results in a NullPointerException. These lines are inside the onCreate() method in my code. Ideally I want to use an onClicked() signal so that I can run certain methods when preferences are changed. Does anyone know what I'm doing wrong?