二阶段开发冲刺一
基于一阶段的开发冲刺,我今天的任务是将星球用户的虚拟信息换成bmob中的真实信息
结果图:
代码:
//加载星球用户 private void loadStartUser() { BmobManager.getInstance().queryAllUser(new FindListener<MyMeetUser>() { @Override public void done(List<MyMeetUser> list, BmobException e) { if (e==null) { if(CommonUtils.isEmpty(list)) { if(myMeetUserList.size()>0) { myMeetUserList.clear(); } if(mStarlist.size()>0) { mStarlist.clear(); } myMeetUserList=list; int index=40; //所有用户 if(list.size()<=40) { index=list.size(); } for(int i=0;i<index;i++) { MyMeetUser myMeetUser= list.get(i); saveStarUser(myMeetUser.getObjectId(),myMeetUser.getNickName(),myMeetUser.getPhoto()); } cloudTagAapter.notifyDataSetChanged(); } } } }); } ///存储星球用户 private void saveStarUser(String userId,String nickName,String photoUrl) { StarModel model=new StarModel(); model.setNickName(nickName); model.setPhotoUrl(photoUrl); model.setUserId(userId); mStarlist.add(model); }