AVQuery<AVObject> avQuery = new AVQuery<>("Feeds");
avQuery.orderByDescending("createdAt");
avQuery.whereEqualTo("likedCount", 20);
// avQuery.limit(10);
// avQuery.include("owner");
avQuery.findInBackground().subscribe(new Observer<List<AVObject>>() {
@Override
public void onSubscribe(Disposable d) {
Toast.makeText(getApplicationContext(),d.toString(),Toast.LENGTH_LONG).show();
}
@Override
public void onNext(List<AVObject> list) {
feedList.addAll(list);
feedAdapter.notifyDataSetChanged();
}
@Override
public void onError(Throwable e) {
}
@Override
public void onComplete() {
}
每次查询都会跳到onSubscribe(Disposable d)