コード例 #1
0
  @Override
  public void onError(SyncServiceException e) {
    if (e.isNetworkError()) {
      Crouton.makeText(this, e.getRessourceString(), Style.ALERT).show();
      return;
    }

    FragmentManager fm = getSupportFragmentManager();
    ErrorDialogFragment errorDialog = ErrorDialogFragment.newInstance(e, Extra.UNKNOWN);
    if (errorDialog == null) return;

    errorDialog.show(fm, ErrorDialogFragment.TAG);
  }