Ejemplo n.º 1
0
  private void initUpdateHeade(String imageIO) {
    IUpdateUI ui =
        new IUpdateUI() {

          @Override
          public void updata(Object allData) {
            // TODO Auto-generated method stub
            if (allData == null) {
              Toast.makeText(getActivity(), "网络不给力", Toast.LENGTH_SHORT).show();
              return;
            }
            LogAh.e("修改图片::" + allData.toString());
            mCodeMessageBean = (CodeMessageBean) allData;
            if (mCodeMessageBean.getCode().equals("0")) {
              Toast.makeText(getActivity(), mCodeMessageBean.getMessage(), Toast.LENGTH_SHORT)
                  .show();
            } else if (mCodeMessageBean.getCode().equals("1")) {
              Toast.makeText(getActivity(), mCodeMessageBean.getMessage(), Toast.LENGTH_SHORT)
                  .show();
            }
          }
        };
    GetDataAsyncZGQ asyncZGQ =
        new GetDataAsyncZGQ(
            getActivity(), ui, true, RequestBaseMapZGQ.getUpdateImage(mUser.getId(), imageIO));
    asyncZGQ.execute(EFaceTypeZGQ.URL_UPDATE_IMAGE);
  }
Ejemplo n.º 2
0
  private void initRefreshUserInfo() {
    IUpdateUI ui =
        new IUpdateUI() {

          @Override
          public void updata(Object allData) {
            // TODO Auto-generated method stub
            if (allData == null) {
              Toast.makeText(getActivity(), "网络不给力", Toast.LENGTH_SHORT).show();
              return;
            }
            LogAh.e("刷新用户信息::" + allData.toString());
            mUserBean = (RefreshUserInfoBean) allData;
            LoginHelper.saveLogin(
                getActivity(), mUserBean.getId(), mUserBean.getUsername(), mUserBean.getImage());
            initHeade(mUserBean.getImage());
          }
        };
    GetDataAsyncZGQ asyncZGQ =
        new GetDataAsyncZGQ(
            getActivity(), ui, true, RequestBaseMapZGQ.getUpdateImage(mUser.getId()));
    asyncZGQ.execute(EFaceTypeZGQ.URL_REFRESH_USERINFO);
  }