示例#1
0
  @Override
  public void onDestroy() {
    loaderManager.destroyLoader(ID_RECEIVING_ADDRESS_LOADER);
    loaderManager.destroyLoader(ID_RATE_LOADER);

    super.onDestroy();
  }
示例#2
0
  @Override
  public void onPause() {
    prefs.unregisterOnSharedPreferenceChangeListener(this);

    loaderManager.destroyLoader(ID_RATE_LOADER);
    loaderManager.destroyLoader(ID_BALANCE_LOADER);

    activity.unregisterReceiver(broadcastReceiver);

    super.onPause();
  }
  @Override
  public void onDestroy() {
    config.unregisterOnSharedPreferenceChangeListener(this);

    loaderManager.destroyLoader(ID_RATE_LOADER);

    super.onDestroy();
  }
  @Override
  public void onPause() {
    loaderManager.destroyLoader(ID_BALANCE_LOADER);

    activity.unregisterReceiver(broadcastReceiver);

    super.onPause();
  }
  @Override
  public void onPause() {
    loaderManager.destroyLoader(ID_TRANSACTION_LOADER);

    activity.unregisterReceiver(tickReceiver);

    super.onPause();
  }
  @Override
  public void onPause() {
    loaderManager.destroyLoader(ID_RATE_LOADER);

    Nfc.unpublish(nfcManager, activity);

    amountCalculatorLink.setListener(null);

    super.onPause();
  }
  @Override
  public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);

    // create and auto start loader
    LoaderManager loaderManager = this.getLoaderManager();
    loaderManager.destroyLoader(0);
    loaderManager.initLoader(0, null, this);

    this.mAdapter = new LocationsAdapter(getActivity(), R.layout.fragment_locations_item_view);

    this.setListAdapter(mAdapter);
    this.isListShown = true;
    this.setListShown(false);

    this.getActivity().invalidateOptionsMenu();
  }
 /**
  * Helper method to destroy the loader
  *
  * @param loaderId
  * @param loaderManager
  */
 public static void destroyLoader(@PhotosLoaderId int loaderId, LoaderManager loaderManager) {
   loaderManager.destroyLoader(loaderId);
 }
        @Override
        public void onServiceDisconnected(final ComponentName name) {
          loaderManager.destroyLoader(ID_BLOCK_LOADER);

          service = null;
        }