コード例 #1
0
 @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);
      }
    }
コード例 #3
0
 @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();
 }