我想自动将更新后的数据加载到解析云中。我正在使用ParseQueryAdapter从Parse请求更新的数据。我还设置了commentQueryAdapter.setAutoLoad(true),但它仍然没有刷新数据。
//Set up a customized query
final ParseQueryAdapter.QueryFactory<ParseCommentsClass> factory =
new ParseQueryAdapter.QueryFactory<ParseCommentsClass>() {
public ParseQuery<ParseCommentsClass> create() {
ParseQuery<ParseCommentsClass> query = ParseCommentsClass.getQuery();
query.whereEqualTo("videoId", videoID);
query.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ELSE_CACHE);
query.orderByDescending("createdAt");
return query;
}
};
// Set up the query adapter
commentsQueryAdapter = new ParseQueryAdapter<ParseCommentsClass>(this, factory) {
@Override
public View getItemView(final ParseCommentsClass post, View view, ViewGroup parent) {
if (view == null) {
view = View.inflate(getContext(), R.layout.comments_layout, null);
}
ImageView ProfileView = (ImageView) view.findViewById(R.id.profilePic);
TextView usernameView = (TextView) view.findViewById(R.id.name);
TextView commentsView = (TextView)view.findViewById(R.id.comments);
String ProfileThumb = String.valueOf(post.getUserPic().getUrl());
Picasso.with(SingleVideoView.this)
.load(ProfileThumb)
.transform(new CircleTransform())
.resize(70,70)
.centerCrop()
.into(ProfileView);
usernameView.setText(post.getUser());
commentsView.setText(post.getComment());
return view;
}
};
// Disable pagination, we'll manage the query limit ourselves
// commentsQueryAdapter.setPaginationEnabled(false);
listView = (ListView)findViewById(R.id.comments_list);
listView.setAdapter(commentsQueryAdapter);
commentsQueryAdapter.setAutoload(true);
}
答案 0 :(得分:0)
好的,我找到了一种从Parse Cloud实现间隔刷新的方法。
=IF(ISNA(VLOOKUP(CONCATENATE($B$2,A3),'All Approvals'!$D$2:$D$175,1,FALSE)),"","x")