我想在以下查询中显示每个关系中的所有对象。但它仍然是空的。我尝试使用此代码,但它不起作用。我希望有一个人可以帮助我。提前致谢
mData = new ArrayList<>();
ParseQuery<ParseObject> receiver = ParseQuery.getQuery("Group");
receiver.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> feed, ParseException e) {
if (e == null) {
mData = feed;
for (int i = 0; i < mData.size(); i++) {
ParseRelation<ParseObject> relation = mData.get(i).getRelation("Data");
ParseQuery<ParseObject> query = relation.getQuery();
query.findInBackground(new FindCallback<ParseObject>() {
@Override
public void done(List<ParseObject> objects, ParseException e) {
rData = objects;
Log.e("APP", String.valueOf(rData.size()));
Log.d("APP", "mData" + mData.size());
if (mSwipeStack.getAdapter() == null) {
mAdapter = new SwipeAdapter(getContext(), rData);
mSwipeStack.setAdapter(mAdapter);
mAdapter.notifyDataSetChanged();
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
Log.d("mAdapter", "Loaded");
}
}, 4000);
//mSwipeStack.setListener(getActivity());
Log.i("APP", "We found messages!");
}
}
});
}
}
}
});
对不起,我的英语不好 :)