ps:又渴又饿的状态下根本静不下心来。

    懒得写字了,看代码吧

    private void getContact(List<ContactDomain> cdList, int first, int max)
            {
                ContentResolver cr = this.getContentResolver();
                Cursor resultCursor = cr.query(Phone.CONTENT_URI, PHONES_PROJECTION, null, null, "_id  limit " + first + ","+ max);//从first开始取max数量
                if (resultCursor != null && resultCursor.getCount() != 0)
                    {
                        while (resultCursor.moveToNext())
                            {
                                ContactDomain cd = new ContactDomain();
                                // 得到手机号码
                                cd.name = resultCursor.getString(0);
                                cd.phoneNum = resultCursor.getString(1);
                                if(ispull)//判断下拉
                                    {
                                        cdbfList.add(cd);
                                    }
                                else{
                                    cdList.add(cd);
                                }
                            }
                        if(!ispull)
                            {
                                currentCount += resultCursor.getCount();
                            }
                    } else
                    {
                        isnull = true;//没有下一页了
                    }
resultCursor.close();
            }

    

    下拉刷新用的是这个

    

    全部代码:github