Ejemplo n.º 1
0
  private void handleSubmit() {
    String content = mEtInput.getText().toString();
    if (StringUtils.isEmpty(content) || mTeam == null) return;
    OSChinaTeamApi.pubTeamNewActive(
        mTeam.getId(),
        content,
        imgFile,
        new AsyncHttpResponseHandler() {

          @Override
          public void onSuccess(int arg0, Header[] arg1, byte[] arg2) {
            Result result = XmlUtils.toBean(ResultBean.class, arg2).getResult();
            if (result != null && result.OK()) {
              AppContext.showToast(result.getErrorMessage());
              finish();
            } else {
              AppContext.showToast(result.getErrorMessage());
            }
          }

          @Override
          public void onFailure(int arg0, Header[] arg1, byte[] arg2, Throwable arg3) {
            AppContext.showToast("发表失败,请检查下你的网络");
          }

          @Override
          public void onStart() {
            super.onStart();
            showWaitDialog("提交中...");
          }

          @Override
          public void onFinish() {
            super.onFinish();
            hideWaitDialog();
          }
        });
  }
Ejemplo n.º 2
0
 @Override
 protected void sendRequestData() {
   // TODO Auto-generated method stub
   OSChinaTeamApi.getTeamProjectActiveList(mTeamId, mTeamProject, "all", mCurrentPage, mHandler);
 }