2 xss534890437 xss534890437 于 2014.10.15 10:35 提问

android 系统联系人按照拼音顺序分页加载
Cursor resultCursor = getContentResolver().query(
                    Phone.CONTENT_URI,
                    new String[] { "display_name", "sort_key", "contact_id",
                                "data1" }, null, null, "_id limit " + first + ","
                                        + max+" order by sort_key");

按照联系人拼音顺序分页读取联系人,老是报错,,求大神,错在哪里,应该怎么写

1个回答

xss534890437
xss534890437   2014.10.15 10:40

拼音排序是可已的如下面语句
Cursor resultCursor = getContentResolver().query(
Phone.CONTENT_URI,
new String[] { "display_name", "sort_key", "contact_id",
"data1" }, null, null, "sort_key");

分页也是可以的
Cursor resultCursor = cr.query(Phone.CONTENT_URI, new String[] { "display_name", "sort_key", "contact_id",
"data1" }, null, null, "_id limit " + first + ","
+ max);

怎么用and连起来就有问题啊

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!