在Android中提取限制的记录(SQLite数据库) [英] Limit Records fetched in Android (Sqlite database)
问题描述
我想从收件箱中取出短信,发送的邮件和草稿。我愿做一个分页我的列表视图为它的当务之急是我取的页/块的记录。
I am trying to fetch sms messages from inbox, sent items and drafts. I would like to do a pagination for my list view for that it's imperative that I fetch records in pages/chunks.
我不熟悉使用SQLite这是我理解的Android用来存储数据的数据库。谁能告诉我,我怎么可以限制我取的记录数通过contentResolver.query?
I am not familiar with sqlite which is the database I understand android use to store the data. Can someone tell me how can I restrict the number of records I am fetching by using contentResolver.query?
还有什么是SQLite数据库文件被拉到我的机器和浏览/本地查询它的实验或看到我的机器上数据的方式?
Also what is the way to pull the sqlite database file onto my machine and browse/query it locally to experiment or see data on my machine?
是否有其他落实在android系统分页更好的方法??
感谢
推荐答案
似乎没有任何办法来限制从<一个结果href=\"http://www.google.com/$c$csearch/p?hl=en#yWp0w9CmGlI/src/com/android/providers/telephony/SmsProvider.java&q=SmsProvider.java&sa=N&cd=8&ct=rc\"相对=nofollow> SmsProvider
。然而,你应该不是真的需要,因为你使用的CursorAdapter
键,不要试图读取其中的内容到您自己的数据结构。您是否尝试过这个?
There doesn't seem to be any way to limit your results from the SmsProvider
. However you shouldn't really need to, given that you use CursorAdapter
and don't try to read the contents into your own data structures. Have you tried this?
这篇关于在Android中提取限制的记录(SQLite数据库)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!