mercredi 29 juillet 2015

When i add data to SQLite DataBase,i want to update the RecyclerView

For example,RecyclerView is in "A" Activity,then intent to "B" Activity.Later,when I add data to SQLiteDataBase in "B" Activity,i carry the finish() to go back "A" Activity. I want to update the RecyclerView.I did this like the following,but don't work:

protected void onResume() {
    super.onResume();
    Log.i("TAG", "resume");
    allCaseItemList = getPersonalCaseinfo();
    mListViewAllCaseItemAdapter.notifyDataSetChanged();

}

see here: allCaseItemListis my datalist,mListViewAllCaseItemAdapteris my customAdapter

Aucun commentaire:

Enregistrer un commentaire