// 需要联网拿数据 private void path4Team() { adapter = new TeamMemberListAdapter(mContext, null, onlyTeam, isCaptain); // 得到适配器的值 adapter.change_number( new Callback_change_number() { @Override public void change_number(boolean isNeedToRefresh2, List<PlayerInTeam> memberList) { // TODO Auto-generated method stub isNeedToRefresh = isNeedToRefresh2; memberList_onlyTeam = memberList; } }); listview.setAdapter(adapter); listview.setPullLoadEnable(false); listview.setXListViewListener( new IXListViewListener() { @Override public void onRefresh() { executeGetTeamMemberList(); } @Override public void onLoadMore() {} }); new LoadTeamMebFromSqlAsyncTask().execute(); // 加载本地数据 executeGetTeamMemberList(); }
private void path4CompleteTeam() { listview.setPullLoadEnable(false); listview.setPullRefreshEnable(false); adapter = new TeamMemberListAdapter( mContext, teamInfoComplete.getPlayers(), teamInfoComplete.getTeam(), isCaptain); // 得到适配器的值 adapter.change_number( new Callback_change_number() { @Override public void change_number(boolean isNeedToRefresh2, List<PlayerInTeam> memberList) { // TODO Auto-generated method stub isNeedToRefresh = isNeedToRefresh2; teamInfoComplete.setPlayers(memberList); } }); listview.setAdapter(adapter); }