Beispiel #1
0
  @Override
  public void onRefresh() {
    //		if( BuildConfig.DEBUG ){
    // Track refreshing event
    ExRatesApplication.getInstance().trackEvent("Rates", "Forced Refresh");

    UpdateService.forceUpdate(getActivity());

    //		} else {
    //			mQuotesRefresher.setRefreshing(false);
    //			Toast.makeText(getActivity(), R.string.force_update_na, Toast.LENGTH_SHORT).show();
    //		}
  }
Beispiel #2
0
  @Override
  public void onResume() {
    super.onResume();

    // Tracking the screen view
    ExRatesApplication.getInstance().trackScreenView("Rates Fragment");

    populateRatesListView();

    ((MainActivity) getActivity()).appBarLayout.addOnOffsetChangedListener(this);

    final IntentFilter intentFilter = new IntentFilter();
    intentFilter.addAction(ExRatesApplication.ACTION_STOCKS_UPDATE);
    intentFilter.addAction(ExRatesApplication.ERROR_NO_CONNECTION);
    getActivity().registerReceiver(mBroadcastReceiver, intentFilter);
  }