No need to create a new adapter...
.notifyDataSetChanged()
should be called only in case the data rows actually changed (inserted or deleted rows), in case you just updated the values on rows a simple call to requery() on your cursor should be enough:
adapter.getCursor().requery();
Edit: by your comment I see that you have in fact a compilation problem...
You must declare the adapter as a class member (before/after mHandler declare it: private SimpleCursorAdapter adapter
)
Then when you initialize it, replace
SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
R.layout.directory_people_item, mCursor,
new String[]{
//snip
new int[]{
//snip
);
with:
adapter = new SimpleCursorAdapter(this,
R.layout.directory_people_item, mCursor,
new String[]{
//snip
new int[]{
//snip
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…