List of usage examples for android.preference PreferenceCategory getKey
public String getKey()
From source file:org.mozilla.gecko.fxa.activities.FxAccountStatusFragment.java
/** * Iterate through debug buttons, adding a special debug preference click * listener to each of them./* w ww . ja v a2s . com*/ */ protected void connectDebugButtons() { // Separate listener to really separate debug logic from main code paths. final OnPreferenceClickListener listener = new DebugPreferenceClickListener(); // We don't want to use Android resource strings for debug UI, so we just // use the keys throughout. final PreferenceCategory debugCategory = (PreferenceCategory) ensureFindPreference("debug_category"); debugCategory.setTitle(debugCategory.getKey()); for (int i = 0; i < debugCategory.getPreferenceCount(); i++) { final Preference button = debugCategory.getPreference(i); button.setTitle(button.getKey()); // Not very friendly, but this is for debugging only! button.setOnPreferenceClickListener(listener); } }