Open EditTextPreference through code (programmatically)

Viewed 3110

I have made the EditTextPreference 'textPasscode' dependant on a CheckBoxPreference 'checkBoxPasscode'. I want the 'textPasscode' to open up as soon as the user checks the check box.. Is it even possible? If it is, what can I use in the onSharedPreferenceChanged() function?

public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
    if(key.contentEquals("checkBoxPasscode")){
       // ----some method to open edit text "textPasscode" ??
    }
}
2 Answers
Related