I am using FirestorePagingAdapter
for showing data from Firestore and paginate the data. I want to refresh the adapter with new data when Firestore changes . notifyDataSetChanged()
is not working when ever I want to notify data .currently I am calling this :
public void setPaging(Query query) {
FirestorePagingOptions<AddFabricModel> options = new FirestorePagingOptions.Builder<AddFabricModel>()
.setLifecycleOwner(this)
.setQuery(query, config, AddFabricModel.class)
.build();
adapter=new AllFabricsAdapter(context,options,this);
rvAllFabrics.setAdapter(adapter);
}
To notify the data I am passing the query then creating the adapter obj again which i dont want.