使用recyclerview与数据库 [英] Using the recyclerview with a database

查看:403
本文介绍了使用recyclerview与数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前有RecyclerView.Adapter的可用的默认实现。

Currently there is no default implementation of RecyclerView.Adapter available.

可能与正式发布后,谷歌将其添加。

May be with the official release, Google will add it.

由于不存在的CursorAdapter不支持与recyclerview目前,怎能用一个recyclerview与数据库?有什么建议么 ?

Since there is no support for CursorAdapter with the recyclerview currently, how can we use a recyclerview with a database ? Any suggestions ?

推荐答案

如果您正在使用一个CursorLoader查询,你想要的,而不是ListView的RecyclerView。

If you are running a query with a CursorLoader and you want RecyclerView instead of ListView.

您可以试试我的CursorRecyclerViewAdapter:的CursorAdapter在RecyclerView

You can try my CursorRecyclerViewAdapter: CursorAdapter in RecyclerView

这篇关于使用recyclerview与数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆