问题描述
解决方案
GroupDetailsActivity 这个类中的 if (!group.getOwner().equals(EMClient.getInstance().getCurrentUser())) {// if current user is not group admin, hide add/remove btnconvertView.setVisibility(View.INVISIBLE);} protected void deleteMembersFromGroup(final String username) {final ProgressDialog deleteDialog = new ProgressDialog(GroupDetailsActivity.this);deleteDialog.setMessage(st13);deleteDialog.setCanceledOnTouchOutside(false);deleteDialog.show();new Thread(new Runnable() {@Overridepublic void run() {try {// 删除被选中的成员 EMClient.getInstance().groupManager().removeUserFromGroup(groupId, username);isInDeleteMode = false;runOnUiThread(new Runnable() {@Overridepublic void run() {deleteDialog.dismiss();refreshMembers();((TextView) findViewById(R.id.group_name)).setText(group.getGroupName() + "("+ group.getAffiliationsCount() + st);}});} catch (final Exception e) {deleteDialog.dismiss();runOnUiThread(new Runnable() {public void run() {Toast.makeText(getApplicationContext(), st14 + e.getMessage(), 1).show();}});}}}).start();