Android的API提供了通过SQLite的清洁机制,使查询到联系人列表。但是,我不知道如何限制的结果:
Android's API provides a clean mechanism via SQLite to make queries into the contact list. However, I am not sure how to limit the results:
Cursor cur = ((Activity)mCtx).managedQuery(
People.CONTENT_URI,
columns,
"LIMIT ? OFFSET ?",
new String[] { Integer.toString(limit), Integer.toString(offset) },
null
);
不能正常工作。
Doesn't work.
其实,根据不同的供应商,你可以按如下附加限制到URI:
Actually, depending on the provider you can append a limit to the URI as follows:
uri.buildUpon().appendQueryParameter("limit", "40").build()
我知道MediaProvider处理这和看近code似乎可以与联系人也做到这一点。
I know the MediaProvider handles this and from looking at recent code it seems you can do it with contacts too.
上一篇:检测裁剪Android中的TextViewAndroid、TextView
下一篇:如何设置一个&QUOT的IP(UserHostAddress);嘲笑'BaseHttpContext?如何设置、QUOT、IP、BaseHttpContext