@Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    int type = getPreferenceType();
    addPreferencesFromResource(PrefsLogic.getXmlResourceForType(type));
    PrefsLogic.afterBuildPrefsForType(getActivity(), this, getPreferenceType());
  }
 @Override
 protected int getXmlPreferences() {
   return PrefsLogic.getXmlResourceForType(getPreferenceType());
 }