将 recyclerview 与数据库一起使用 [英] Using the recyclerview with a database
问题描述
目前没有可用的 RecyclerView.Adapter 的默认实现.
可能会随着正式发布,Google 会添加.
由于目前RecyclerView
不支持CursorAdapter
,我们如何将RecyclerView
与数据库一起使用?有什么建议 ?
如果您正在使用 CursorLoader
运行查询并且您想要 RecyclerView
而不是 ListView代码>.
你可以试试我的CursorRecyclerViewAdapter
:CursorAdapter in RecyclerView>
Currently there is no default implementation of RecyclerView.Adapter available.
May be with the official release, Google will add it.
Since there is no support for CursorAdapter
with the RecyclerView
currently, how can we use a RecyclerView
with a database ? Any suggestions ?
If you are running a query with a CursorLoader
and you want RecyclerView
instead of ListView
.
You can try my CursorRecyclerViewAdapter
: CursorAdapter in RecyclerView
这篇关于将 recyclerview 与数据库一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!