当前位置: 动力学知识库 > 问答 > 编程问答 >

android - How to update RecyclerView.Adapter?

问题描述:

When RecyclerView.Adapter change, should I reevaluate rawQuery and assign cursor again and call notifyDataSetChanged() method? Or is any easier solution?

String rawQuery = "...";

Cursor cursor1 = MainActivity.db.rawQuery(rawQuery, null);

ItemUserSettingRatingActivity.itemAdapter.cursor = cursor1;

IterUserSettingRatingActivity.itemAdapter.notifyDataSetChanged();

分享给朋友:
您可能感兴趣的文章:
随机阅读: