代码
// 全部刷新 // ((ListViewAdapter)mListView.getAdapter()).notifyDataSetChanged(); // 局部刷新 int start = mListView.getFirstVisiblePosition(); int end = mListView.getLastVisiblePosition(); for (int i = start; i <= end; i++) { View view = mListView.getChildAt(i - start); mListView.getAdapter().getView(i, view, mListView); }
mListView是ListView控件