【发布时间】:2020-09-09 06:36:59
【问题描述】:
目前我正在使用 FirestoreRecyclerAdapter 和 FirestoreRecyclerOptions,他可以监听数据更新,但是这种方法会消耗大量数据,所以,我尝试使用 FirestorePagingOptions 和 FirestorePagingAdapter,他可以对数据进行分页并获得经济的日期,但是,当使用 RecyclerView 方法更新数据时,我有 adapter.startListening(),但是没有用。
这项工作非常好,但是消耗的数据很强。
public class AnuncioAdapter extends FirestoreRecyclerAdapter<AnuncioPrincipal, AnuncioAdapter.AnuncioHolder> {
public AnuncioAdapter(FirestoreRecyclerOptions<AnuncioPrincipal> options)
{
super(options);
}
该方法经济适用,但不能更新...
public class AnuncioAdapter extends FirestorePagingAdapter<AnuncioPrincipal, AnuncioAdapter.AnuncioHolder> {
public AnuncioAdapter(FirestorePagingOptions<AnuncioPrincipal> options)
{
super(options);
}
【问题讨论】:
标签: firebase google-cloud-firestore android-recyclerview