vendredi 18 septembre 2015

When I add data to DataBase ,the data in listview is messy

A listView in Fragment,I click it to intent a Activity,in this Activity I add data to SQLite DataBase,then i click home button of ActionBar to back to the Fragment,but the data of some item is messy and not right.

the following is how i refresh data when back to Fragment

 @Override
public void onResume() {
    super.onResume();
    allCaseItemList.clear();
    allCaseItemList.addAll(ALLCaseBF.getPersonalCaseInfo(mPersonId, getActivity()));
    mListViewAllCaseItemAdapter.notifyDataSetChanged();
}

here:allCaseItemList is my datalist,getPersonalCaseInfo() is the methods to get data from SQLite DataBase.

But i don't konw where the error is! Anyone can help me?

Aucun commentaire:

Enregistrer un commentaire