public void refresh() { if (groupListView != null && groupAdapter != null) { grouplist = EMGroupManager.getInstance().getAllGroups(); groupAdapter = new GroupAdapter(GroupsActivity.this, 1, grouplist); groupListView.setAdapter(groupAdapter); groupAdapter.notifyDataSetChanged(); } }
@Override public void onResume() { super.onResume(); grouplist = EMGroupManager.getInstance().getAllGroups(); groupAdapter = new GroupAdapter(this, 1, grouplist); groupListView.setAdapter(groupAdapter); groupAdapter.notifyDataSetChanged(); }