- adapter重写getItemId方法;
@Override
public long getItemId(int position) {
return position;
}
- adapter执行setHasStableIds(true);
mListAdapter.setHasStableIds(true);
- 新增set数据的方法,更新数据时调用此方法,并调用notifyDataSetChanged();
public void resetDatas(List<JsonConfiguration.FeaturedApp> list)
{
mList = list;
notifyDataSetChanged();
}