requery()
updates a Cursor
, not a CursorAdapter
. As you say, it has been deprecated, and its replacement is:
oldCursor = myCursorAdapter.swapCursor(newCursor); // hands you back oldCursor
or:
myCursorAdapter.changeCursor(newCursor); // automatically closes old Cursor
myCursorAdapter.notifyDataSetChanged()
notifies the ListView
that the data set has changed, and it should refresh itself
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…