基于一阶段冲刺目前我需要做的是将APP的星球部分的用户真实信息给拉取过来,今天主要就是做了这部分,将虚拟数据换成真实的数据

演示结果

 

 

 

 

 代码部分

//加载星球用户
    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);
    }

 

版权声明:本文为yizhixiaozhu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/yizhixiaozhu/p/13060216.html