예제 #1
0
 @Override
 public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setRetainInstance(true);
   mContext = getActivity();
   dbhandler = DatabaseHandler.getInstance(mContext);
   savedInstanceState = getArguments();
   if (savedInstanceState != null
       && savedInstanceState.getString("PREFERENCE_SCREEN_KEY") != null) {
     savedInstanceState.remove("PREFERENCE_SCREEN_KEY");
     addPreferencesFromResource(R.xml.pref_year);
     mTitle = getString(R.string.year);
   } else {
     addPreferencesFromResource(R.xml.pref_settings);
     PreferenceScreen preferencescreen = getPreferenceScreen();
     mPush = (CheckBoxPreference) preferencescreen.findPreference("pref_push");
     mYear = preferencescreen.findPreference("pref_year");
     appVersion = preferencescreen.findPreference("appVersion");
     bugReport = preferencescreen.findPreference("bugReport");
     jonny = preferencescreen.findPreference("jonny");
     mTitle = getString(R.string.settings);
     setPrefs();
     setStaticPrefs();
   }
 }
  @Override
  public void onCreate(Bundle paramBundle) {
    super.onCreate(paramBundle);
    masterSecret = getArguments().getParcelable("master_secret");
    addPreferencesFromResource(R.xml.preferences_advanced);

    initializeIdentitySelection();

    Preference submitDebugLog = this.findPreference(SUBMIT_DEBUG_LOG_PREF);
    submitDebugLog.setOnPreferenceClickListener(new SubmitDebugLogListener());
    submitDebugLog.setSummary(getVersion(getActivity()));
  }
 @Override
 public void onCreate(Bundle paramBundle) {
   super.onCreate(paramBundle);
   addPreferencesFromResource(R.xml.prefs_next_word);
 }