@Override
 protected void onPostExecute(Boolean success) {
   super.onPostExecute(success);
   if (success) {
     activity.finish();
   }
 }
예제 #2
0
    @Override
    protected void onPostExecute(Boolean success) {
      super.onPostExecute(success);
      if (success) {
        if (status != null) {
          if (status == 0) {
            onLoaded(success);
          } else if (status == 100) {
            errorMessage = getString(R.string.internet_connection);
            createDialog(DIALOG_SHOW_MESSAGE);
          } else if (status == 99) {
            errorMessage = getString(R.string.failed);
            createDialog(DIALOG_SHOW_MESSAGE);
          } else if (status == 112) {
            errorMessage = getString(R.string.network_error);
            createDialog(DIALOG_SHOW_MESSAGE);
          } else {
            errorMessage = getString(R.string.error_occured);
            createDialog(DIALOG_SHOW_MESSAGE);
          }

        } else {
          toastLong(R.string.failed);
        }

      } else {
        toastLong(R.string.failed);
      }
    }
 @Override
 protected void onPostExecute(Boolean success) {
   super.onPostExecute(success);
   if (success) {
     toastLong(R.string.saved);
     activity.finish();
   } else {
     toastLong(R.string.not_saved);
   }
 }
예제 #4
0
 @Override
 protected void onPreExecute() {
   super.onPreExecute();
   dialog.cancel();
 }