예제 #1
0
  @Override
  protected void onPause() {
    super.onPause();

    // Unregister the listener whenever a key changes
    getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
  }
 @Override
 protected void onPause() {
   mIsPaused = true;
   if (mIsArabic != mInitiallyIsArabic) {
     Intent i = new Intent(this, com.quran.labs.androidquran.ui.QuranActivity.class);
     i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
     startActivity(i);
   }
   super.onPause();
 }
예제 #3
0
  /*
   * @see android.app.Fragment#onPause()
   */
  @TargetApi(9)
  @Override
  public void onPause() {

    super.onPause();

    if (Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) return;

    getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
    SharedPreferences spePreferences =
        PreferenceManager.getDefaultSharedPreferences(this.getApplicationContext());

    EditTextPreference etpUsername =
        (EditTextPreference) getPreferenceScreen().findPreference("torrentleech_username");
    if (!spePreferences.getString("torrentleech_username", "").isEmpty())
      etpUsername.setSummary(spePreferences.getString("torrentleech_username", ""));

    EditTextPreference etpPassword =
        (EditTextPreference) getPreferenceScreen().findPreference("torrentleech_password");
    if (!spePreferences.getString("torrentleech_password", "").isEmpty())
      etpPassword.setSummary(
          spePreferences.getString("torrentleech_password", "").replaceAll("(?s).", "*"));
  }
예제 #4
0
 @Override
 protected void onPause() {
   super.onPause();
   getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
 }