private void addFriendSend() { mProgressDialog.show(); // 日志List取得的参数设定 Map<String, String> param1 = new HashMap<String, String>(); param1.put("UserId", LoginInfo.getLoginUserId(this)); param1.put("ContactId", mFriendInfo.getUser_id()); param1.put("GroupId", mSelectedGroupId); String memo = mEditMemoName.getText().toString().trim(); if (memo.length() > 0) { param1.put("ContactMemo", memo); } HttpGetUtil httpGetUtil = new HttpGetUtil( new RequestGetDoneCallback() { @Override public void requestWithGetDone(String result) { mProgressDialog.dismiss(); addFriendDone(); } }); httpGetUtil.execute(ConstantDef.cUrlContactAdd, param1); }
private void showDetail() { mProgressDialog.show(); mGroupData = new ArrayList<FriendGroupListInfo>(); mGroupDataName = new ArrayList<String>(); mGroupDataId = new ArrayList<String>(); // 日志List取得的参数设定 Map<String, String> param1 = new HashMap<String, String>(); param1.put("UserId", LoginInfo.getLoginUserId(this)); HttpGetUtil httpGetUtil = new HttpGetUtil( new RequestGetDoneCallback() { @Override public void requestWithGetDone(String result) { mProgressDialog.dismiss(); JSONArray jsonArray; try { jsonArray = new JSONArray(result); for (int i = 0; i < jsonArray.length(); i++) { JSONObject jsonObject = jsonArray.getJSONObject(i); FriendGroupListInfo Groupinfo = new FriendGroupListInfo(jsonObject); mGroupData.add(Groupinfo); mGroupDataName.add(Groupinfo.getGroup_name()); mGroupDataId.add(Groupinfo.getGroup_id()); if (i == 0) { // 显示默认分组 mSelectedGroupId = Groupinfo.getGroup_id(); mTxtGroupName.setText(Groupinfo.getGroup_name()); } } } catch (JSONException e) { e.printStackTrace(); } } }); httpGetUtil.execute(ConstantDef.cUrlContactGroupEdit, param1); }