@Override public void onAttached() { super.onAttached(); Activity activity = (Activity) getContext(); NumberPickerDialog numberPicker = (NumberPickerDialog) activity.getFragmentManager().findFragmentByTag(getFragmentTag()); if (numberPicker != null) { // re-bind listener to fragment numberPicker.setListener(listener); } }
@Override public void onAttached() { super.onAttached(); mKeyboardShortcutHandler.registerOnSharedPreferenceChangeListener(mPreferencesChangeListener); }