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

    int type = getPreferenceType();
    addPreferencesFromResource(PrefsLogic.getXmlResourceForType(type));
    PrefsLogic.afterBuildPrefsForType(getActivity(), this, getPreferenceType());
  }
Esempio n. 2
0
 @Override
 public boolean onOptionsItemSelected(MenuItem item) {
   if (PrefsLogic.onMainActivityOptionsItemSelected(item, this, prefsWrapper)) {
     return true;
   }
   return super.onOptionsItemSelected(item);
 }
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setTitle(PrefsLogic.getTitleResourceForType(getPreferenceType()));
   ActionBar ab = getSupportActionBar();
   if (ab != null) {
     ab.setDisplayHomeAsUpEnabled(true);
   }
 }
Esempio n. 4
0
 @Override
 public boolean onPrepareOptionsMenu(Menu menu) {
   PrefsLogic.onMainActivityPrepareOptionMenu(menu, this, prefsWrapper);
   return super.onPrepareOptionsMenu(menu);
 }
 @Override
 protected void updateDescriptions() {
   PrefsLogic.updateDescriptionForType(this, this, getPreferenceType());
 }
 @Override
 protected void afterBuildPrefs() {
   super.afterBuildPrefs();
   PrefsLogic.afterBuildPrefsForType(this, this, getPreferenceType());
 }
 @Override
 protected int getXmlPreferences() {
   return PrefsLogic.getXmlResourceForType(getPreferenceType());
 }